@NotThreadSafe public class SerializableEntityHC4 extends AbstractHttpEntityHC4
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.chunked, contentEncoding, contentType, OUTPUT_BUFFER_SIZE| Constructor and Description |
|---|
SerializableEntityHC4(java.io.Serializable ser) |
SerializableEntityHC4(java.io.Serializable ser,
boolean bufferize)
Creates new instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
java.io.InputStream |
getContent() |
long |
getContentLength() |
boolean |
isRepeatable() |
boolean |
isStreaming() |
void |
writeTo(java.io.OutputStream outstream) |
consumeContent, getContentEncoding, getContentType, isChunked, setChunked, setContentEncoding, setContentEncoding, setContentType, setContentTypepublic SerializableEntityHC4(java.io.Serializable ser,
boolean bufferize)
throws java.io.IOException
ser - inputbufferize - tells whether the content should be
stored in an internal bufferjava.io.IOException - in case of an I/O errorpublic SerializableEntityHC4(java.io.Serializable ser)
public java.io.InputStream getContent()
throws java.io.IOException,
java.lang.IllegalStateException
java.io.IOExceptionjava.lang.IllegalStateExceptionpublic long getContentLength()
public boolean isRepeatable()
public boolean isStreaming()
public void writeTo(java.io.OutputStream outstream)
throws java.io.IOException
java.io.IOExceptionCopyright © 1999-2015 The Apache Software Foundation. All rights reserved.