Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.http.entity
Interface ContentLengthStrategy

All Known Implementing Classes:
  DisallowIdentityContentLengthStrategy, LaxContentLengthStrategy, StrictContentLengthStrategy

    public interface ContentLengthStrategy

Represents a strategy to determine length of the enclosed content entity based on properties of the HTTP message.

Since:
  4.0

Field Summary
`static int` | `CHUNKED`
`static int` | `IDENTITY`

Method Summary
`long` | `determineLength(HttpMessage message)` Returns length of the given message in bytes.

Field Detail

### IDENTITY

    static final int IDENTITY

See Also:
  Constant Field Values

### CHUNKED

    static final int CHUNKED

See Also:
  Constant Field Values

Method Detail

### determineLength

    long determineLength(HttpMessage message)
                         throws HttpException

  Returns length of the given message in bytes. The returned value must be a non-negative number, `IDENTITY` if the end of the message will be delimited by the end of connection, or `CHUNKED` if the message is chunk coded

  Parameters:
    `message` - HTTP message
  Returns:
    content length, `IDENTITY`, or `CHUNKED`
  Throws:
    `HttpException` - in case of HTTP protocol violation

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.