java.lang.Object |
↳ |
org.apache.http.entity.AbstractHttpEntity |
|
↳ |
org.apache.http.nio.entity.NByteArrayEntity |
Class Overview
A simple self contained, repeatable non-blocking entity that retrieves
its content from a byte array.
Summary
Fields |
protected
final
ByteBuffer |
buffer |
|
protected
final
byte[] |
content |
|
[Expand]
Inherited Fields |
From class
org.apache.http.entity.AbstractHttpEntity
protected
boolean |
chunked |
|
protected
Header |
contentEncoding |
|
protected
Header |
contentType |
|
|
[Expand]
Inherited Methods |
From class
org.apache.http.entity.AbstractHttpEntity
void
|
consumeContent()
|
Header
|
getContentEncoding()
|
Header
|
getContentType()
|
boolean
|
isChunked()
|
void
|
setChunked(boolean arg0)
|
void
|
setContentEncoding(String arg0)
|
void
|
setContentEncoding(Header arg0)
|
void
|
setContentType(Header arg0)
|
void
|
setContentType(String arg0)
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
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)
|
|
From interface
org.apache.http.nio.entity.ProducingNHttpEntity
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.
|
|
Fields
protected
final
ByteBuffer
buffer
protected
final
byte[]
content
Public Constructors
public
NByteArrayEntity
(byte[] b)
Public Methods
public
void
finish
()
Notification that any resources allocated for writing can be released.
public
long
getContentLength
()
public
boolean
isRepeatable
()
public
boolean
isStreaming
()
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.
|