Package org.apache.http.impl.entity
Class EntitySerializer
- java.lang.Object
-
- org.apache.http.impl.entity.EntitySerializer
-
@Contract(threading=IMMUTABLE_CONDITIONAL) @Deprecated public class EntitySerializer extends java.lang.Object
Deprecated.(4.3) useBHttpConnectionBase
HTTP entity serializer.This entity serializer currently 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 writes out the content of
HttpEntity
to the data stream using a transfer coding based on properties on the HTTP message.- Since:
- 4.0
-
-
Field Summary
Fields Modifier and Type Field Description private ContentLengthStrategy
lenStrategy
Deprecated.
-
Constructor Summary
Constructors Constructor Description EntitySerializer(ContentLengthStrategy lenStrategy)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected java.io.OutputStream
doSerialize(SessionOutputBuffer outbuffer, HttpMessage message)
Deprecated.Creates a transfer codec based on properties of the given HTTP message and returnsOutputStream
instance that transparently encodes output data as it is being written out to the output stream.void
serialize(SessionOutputBuffer outbuffer, HttpMessage message, HttpEntity entity)
Deprecated.Writes out the content of the given HTTP entity to the session output buffer based on properties of the given HTTP message.
-
-
-
Field Detail
-
lenStrategy
private final ContentLengthStrategy lenStrategy
Deprecated.
-
-
Constructor Detail
-
EntitySerializer
public EntitySerializer(ContentLengthStrategy lenStrategy)
Deprecated.
-
-
Method Detail
-
doSerialize
protected java.io.OutputStream doSerialize(SessionOutputBuffer outbuffer, HttpMessage message) throws HttpException, java.io.IOException
Deprecated.Creates a transfer codec based on properties of the given HTTP message and returnsOutputStream
instance that transparently encodes output data as it is being written out to the output stream.This method is called by the public
serialize(SessionOutputBuffer, HttpMessage, HttpEntity)
.- Parameters:
outbuffer
- the session output buffer.message
- the HTTP message.- Returns:
- output stream.
- Throws:
HttpException
- in case of HTTP protocol violation.java.io.IOException
- in case of an I/O error.
-
serialize
public void serialize(SessionOutputBuffer outbuffer, HttpMessage message, HttpEntity entity) throws HttpException, java.io.IOException
Deprecated.Writes out the content of the given HTTP entity to the session output buffer based on properties of the given HTTP message.- Parameters:
outbuffer
- the output session buffer.message
- the HTTP message.entity
- the HTTP entity to be written out.- Throws:
HttpException
- in case of HTTP protocol violation.java.io.IOException
- in case of an I/O error.
-
-