org.apache.http.entity
Class SerializableEntityHC4
java.lang.Object
org.apache.http.entity.AbstractHttpEntityHC4
org.apache.http.entity.SerializableEntityHC4
- All Implemented Interfaces:
- org.apache.http.HttpEntity
@NotThreadSafe
public class SerializableEntityHC4
- extends AbstractHttpEntityHC4
A streamed entity that obtains its content from a 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.
- Since:
- 4.0
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SerializableEntityHC4
public SerializableEntityHC4(java.io.Serializable ser,
boolean bufferize)
throws java.io.IOException
- Creates new instance of this class.
- Parameters:
ser - inputbufferize - tells whether the content should be
stored in an internal buffer
- Throws:
java.io.IOException - in case of an I/O error
SerializableEntityHC4
public SerializableEntityHC4(java.io.Serializable ser)
- Since:
- 4.3
getContent
public java.io.InputStream getContent()
throws java.io.IOException,
java.lang.IllegalStateException
- Throws:
java.io.IOException
java.lang.IllegalStateException
getContentLength
public long getContentLength()
isRepeatable
public boolean isRepeatable()
isStreaming
public boolean isStreaming()
writeTo
public void writeTo(java.io.OutputStream outstream)
throws java.io.IOException
- Throws:
java.io.IOException