org.apache.http.HttpEntity, ConsumingNHttpEntityBasicAsyncRequestProducer
or BasicAsyncResponseProducer@Deprecated public class BufferingNHttpEntity extends org.apache.http.entity.HttpEntityWrapper implements ConsumingNHttpEntity
ConsumingNHttpEntity that consumes content into a buffer. The
content can be retrieved as an InputStream via
HttpEntity.getContent(), or written to an output stream via
HttpEntity.writeTo(OutputStream).| Constructor | Description |
|---|---|
BufferingNHttpEntity(org.apache.http.HttpEntity httpEntity,
ByteBufferAllocator allocator) |
Deprecated.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
consumeContent(ContentDecoder decoder,
IOControl ioctrl) |
Deprecated.
Notification that content is available to be read from the decoder.
|
void |
finish() |
Deprecated.
Notification that any resources allocated for reading can be released.
|
java.io.InputStream |
getContent() |
Deprecated.
Obtains entity's content as
InputStream. |
boolean |
isRepeatable() |
Deprecated.
|
boolean |
isStreaming() |
Deprecated.
|
void |
writeTo(java.io.OutputStream outstream) |
Deprecated.
|
consumeContent, getContentEncoding, getContentLength, getContentType, isChunkedpublic BufferingNHttpEntity(org.apache.http.HttpEntity httpEntity,
ByteBufferAllocator allocator)
public void consumeContent(ContentDecoder decoder, IOControl ioctrl) throws java.io.IOException
ConsumingNHttpEntityIOControl instance passed as a parameter to the method can be
used to suspend input events if the entity is temporarily unable to
allocate more storage to accommodate all incoming content.consumeContent in interface ConsumingNHttpEntitydecoder - content decoder.ioctrl - I/O control of the underlying connection.java.io.IOExceptionpublic void finish()
ConsumingNHttpEntityfinish in interface ConsumingNHttpEntitypublic java.io.InputStream getContent()
throws java.io.IOException
InputStream.getContent in interface org.apache.http.HttpEntitygetContent in class org.apache.http.entity.HttpEntityWrapperjava.lang.IllegalStateException - if content of the entity has not been
fully received or has already been consumed.java.io.IOExceptionpublic boolean isRepeatable()
isRepeatable in interface org.apache.http.HttpEntityisRepeatable in class org.apache.http.entity.HttpEntityWrapperpublic boolean isStreaming()
isStreaming in interface org.apache.http.HttpEntityisStreaming in class org.apache.http.entity.HttpEntityWrapperpublic void writeTo(java.io.OutputStream outstream)
throws java.io.IOException
writeTo in interface org.apache.http.HttpEntitywriteTo in class org.apache.http.entity.HttpEntityWrapperjava.io.IOException