Serializable.
The content obtained from the Serializable instance can
optionally be buffered in a byte array in order to make the
entity self-contained and repeatable.
| Modifier and Type | Field and Description |
|---|---|
| private Serializable | |
| private byte[] |
| Access | Constructor and Description |
|---|---|
| public | SerializableEntity(final Serializable
input ser, final boolean tells whether the content should be
stored in an internal buffer bufferize)Creates new instance of this class. |
| public | SerializableEntity(final Serializable
The object to serialize. serializable)Creates new instance of this class. |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public InputStream | getContent()
Implements org. |
| public long | getContentLength()
Implements org. |
| public boolean | isRepeatable()
Implements org. |
| public boolean | isStreaming()
Implements org. |
| public void | writeTo(final OutputStream
the output stream to write entity content to outStream)Implements org. |
| objRef | back to summary |
|---|---|
| private Serializable objRef | |
| objSer | back to summary |
|---|---|
| private byte[] objSer | |
| SerializableEntity | back to summary |
|---|---|
| public SerializableEntity(final Serializable ser, final boolean bufferize) throws IOException Creates new instance of this class.
| |
| SerializableEntity | back to summary |
|---|---|
| public SerializableEntity(final Serializable serializable) Creates new instance of this class.
| |
| createBytes | back to summary |
|---|---|
| private void createBytes(final Serializable ser) throws IOException | |
| getContent | back to summary |
|---|---|
| public InputStream getContent() throws IOException, IllegalStateException Implements org. Doc from org. Returns a content stream of the entity.
Important Note Please note all entity implementations must ensure that
all allocated resources are properly deallocated after
the
| |
| getContentLength | back to summary |
|---|---|
| public long getContentLength() Implements org. Doc from org. Tells the length of the content, if known.
| |
| isRepeatable | back to summary |
|---|---|
| public boolean isRepeatable() Implements org. Doc from org. Tells if the entity is capable of producing 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.
| |
| isStreaming | back to summary |
|---|---|
| public boolean isStreaming() Implements org. Doc from org. Tells whether this entity depends on an underlying stream.
Streamed entities that read data directly from the socket should
return
| |
| writeTo | back to summary |
|---|---|
| public void writeTo(final OutputStream outStream) throws IOException Implements org. Doc from org. Writes the entity content out to the output stream. Important Note Please note all entity implementations must ensure that all allocated resources are properly deallocated when this method returns.
| |