java.lang.Object
org.apache.http.entity.AbstractHttpEntity
org.apache.http.entity.ByteArrayEntity
- All Implemented Interfaces:
- org.apache.http.HttpEntity
- public class ByteArrayEntity
- extends AbstractHttpEntity
A self-contained entity obtaining content from a byte array.
- Since:
- 4.0
- Version:
- $Revision: 376458 $
|
Field Summary |
private byte[] |
content
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
content
private final byte[] content
ByteArrayEntity
public ByteArrayEntity(byte[] b)
isRepeatable
public boolean isRepeatable()
- Description copied from interface:
org.apache.http.HttpEntity
- Tells if the entity is capable to produce its data more than once.
A repeatable entity's getContent() and writeTo(OutputStream) methods
can be called more than once whereas a non-repeatable entity's can not.
getContentLength
public long getContentLength()
- Description copied from interface:
org.apache.http.HttpEntity
- Tells the length of the content, if known.
getContent
public java.io.InputStream getContent()
- Description copied from interface:
org.apache.http.HttpEntity
- Creates a new InputStream object of the entity.
It is a programming error
to return the same InputStream object more than once.
Entities that are not repeatable 55
will throw an exception if this method is called multiple times.
writeTo
public void writeTo(java.io.OutputStream outstream)
throws java.io.IOException
- Description copied from interface:
org.apache.http.HttpEntity
- Writes the entity content to the output stream.
isStreaming
public boolean isStreaming()
- Tells that this entity is not streaming.