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
 
 
IDENTITY
static final int IDENTITY
- See Also:
- Constant Field Values
CHUNKED
static final int CHUNKED
- See Also:
- Constant Field Values
determineLength
long determineLength(HttpMessage message)
                     throws HttpException
- Returns length of the given message in bytes. The returned value
 must be a non-negative number, IDENTITYif the end of the
 message will be delimited by the end of connection, orCHUNKEDif the message is chunk coded
 
- 
- Parameters:
- message- HTTP message
- Returns:
- content length, IDENTITY, orCHUNKED
- Throws:
- HttpException- in case of HTTP protocol violation
 
Copyright © 2005–2020 The Apache Software Foundation. All rights reserved.