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

public Class EntityDeserializer

extends Object
Class Inheritance
Annotations
@Contract
threading:IMMUTABLE_CONDITIONAL
@Deprecated
Imports
java.io.IOException, org.apache.http.Header, .HttpEntity, .HttpException, .HttpMessage, org.apache.http.annotation.ThreadingBehavior, .Contract, org.apache.http.entity.BasicHttpEntity, .ContentLengthStrategy, org.apache.http.impl.io.ChunkedInputStream, .ContentLengthInputStream, .IdentityInputStream, org.apache.http.io.SessionInputBuffer, org.apache.http.protocol.HTTP, org.apache.http.util.Args

Deprecated

(4.3) use org.apache.http.impl.BHttpConnectionBase

HTTP entity deserializer.

This entity deserializer supports "chunked" and "identitiy" transfer-coding and content length delimited content.

This class relies on a specific implementation of ContentLengthStrategy to determine the content length or transfer encoding of the entity.

This class generates an instance of HttpEntity based on properties of the message. The content of the entity will be decoded transparently for the consumer.

Since
4.0

Field Summary

Modifier and TypeField and Description
private final ContentLengthStrategy

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public HttpEntity

Returns:

HTTP entity.
deserialize
(final SessionInputBuffer
the session input buffer.
inBuffer
,
final HttpMessage
the message.
message
)

Creates an HttpEntity based on properties of the given message.

protected BasicHttpEntity

Returns:

HTTP entity.
doDeserialize
(final SessionInputBuffer
the session input buffer.
inBuffer
,
final HttpMessage
the message.
message
)

Creates a BasicHttpEntity based on properties of the given message.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

lenStrategyback to summary
private final ContentLengthStrategy lenStrategy

Constructor Detail

EntityDeserializerback to summary
public EntityDeserializer(final ContentLengthStrategy lenStrategy)

Method Detail

deserializeback to summary
public HttpEntity deserialize(final SessionInputBuffer inBuffer, final HttpMessage message) throws HttpException, IOException

Creates an HttpEntity based on properties of the given message. The content of the entity is created by wrapping SessionInputBuffer with a content decoder depending on the transfer mechanism used by the message.

The content of the entity is NOT retrieved by this method.

Parameters
inBuffer:SessionInputBuffer

the session input buffer.

message:HttpMessage

the message.

Returns:HttpEntity

HTTP entity.

Exceptions
HttpException:
in case of HTTP protocol violation.
IOException:
in case of an I/O error.
doDeserializeback to summary
protected BasicHttpEntity doDeserialize(final SessionInputBuffer inBuffer, final HttpMessage message) throws HttpException, IOException

Creates a BasicHttpEntity based on properties of the given message. The content of the entity is created by wrapping SessionInputBuffer with a content decoder depending on the transfer mechanism used by the message.

This method is called by the public deserialize(SessionInputBuffer, HttpMessage).

Parameters
inBuffer:SessionInputBuffer

the session input buffer.

message:HttpMessage

the message.

Returns:BasicHttpEntity

HTTP entity.

Exceptions
HttpException:
in case of HTTP protocol violation.
IOException:
in case of an I/O error.