Top Description Fields Constructors Methods
org.apache.http.impl.entity

public Class DisallowIdentityContentLengthStrategy

extends Object
implements ContentLengthStrategy
Class Inheritance
All Implemented Interfaces
org.apache.http.entity.ContentLengthStrategy
Annotations
@Contract
threading:IMMUTABLE_CONDITIONAL
Imports
org.apache.http.HttpException, .HttpMessage, .ProtocolException, org.apache.http.annotation.ThreadingBehavior, .Contract, org.apache.http.entity.ContentLengthStrategy

Decorator for ContentLengthStrategy implementations that disallows the use of identity transfer encoding.
Since
4.2

Field Summary

Modifier and TypeField and Description
private final ContentLengthStrategy
public static final DisallowIdentityContentLengthStrategy

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public long
determineLength(final HttpMessage
HTTP message
message
)

Implements org.apache.http.entity.ContentLengthStrategy.determineLength.

Returns length of the given message in bytes.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contentLengthStrategyback to summary
private final ContentLengthStrategy contentLengthStrategy
INSTANCEback to summary
public static final DisallowIdentityContentLengthStrategy INSTANCE

Constructor Detail

DisallowIdentityContentLengthStrategyback to summary
public DisallowIdentityContentLengthStrategy(final ContentLengthStrategy contentLengthStrategy)

Method Detail

determineLengthback to summary
public long determineLength(final HttpMessage message) throws HttpException

Implements org.apache.http.entity.ContentLengthStrategy.determineLength.

Doc from org.apache.http.entity.ContentLengthStrategy.determineLength.

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:HttpMessage

HTTP message

Returns:long

content length, IDENTITY, or CHUNKED

Annotations
@Override
Exceptions
HttpException:
in case of HTTP protocol violation