org.apache.http.nio.entity.ProducingNHttpEntity |
Known Indirect Subclasses
NByteArrayEntity |
A simple self contained, repeatable non-blocking entity that retrieves
its content from a byte array. |
NFileEntity |
A self contained, repeatable non-blocking entity that retrieves its content
from a file. |
NHttpEntityWrapper |
ProducingNHttpEntity compatibility adaptor for blocking HTTP
entities. |
NStringEntity |
A simple, self contained, repeatable non-blocking entity that retrieves
its content from a String object. |
|
Class Overview
An HttpEntity that can stream content out into a
ContentEncoder
.
Summary
Public Methods |
abstract
void
|
finish()
Notification that any resources allocated for writing can be released.
|
abstract
void
|
produceContent(ContentEncoder encoder, IOControl ioctrl)
Notification that content should be written to the encoder.
|
[Expand]
Inherited Methods |
From interface
org.apache.http.HttpEntity
abstract
void
|
consumeContent()
|
abstract
InputStream
|
getContent()
|
abstract
Header
|
getContentEncoding()
|
abstract
long
|
getContentLength()
|
abstract
Header
|
getContentType()
|
abstract
boolean
|
isChunked()
|
abstract
boolean
|
isRepeatable()
|
abstract
boolean
|
isStreaming()
|
abstract
void
|
writeTo(OutputStream arg0)
|
|
Public Methods
public
abstract
void
finish
()
Notification that any resources allocated for writing can be released.
public
abstract
void
produceContent
(ContentEncoder encoder, IOControl ioctrl)
Notification that content should be written to the encoder.
IOControl
instance passed as a parameter to the method can be
used to suspend output events if the entity is temporarily unable to
produce more content.
When all content is finished, this MUST call complete()
.
Failure to do so could result in the entity never being written.
Parameters
encoder
| content encoder. |
ioctrl
| I/O control of the underlying connection.
|