public class DecompressingEntity
extends org.apache.http.entity.HttpEntityWrapper
HttpEntity implementations.| Modifier and Type | Field and Description |
|---|---|
private static int |
BUFFER_SIZE
Default buffer size.
|
private java.io.InputStream |
content
getContent() method must return the same InputStream
instance when DecompressingEntity is wrapping a streaming entity. |
private InputStreamFactory |
inputStreamFactory |
| Constructor and Description |
|---|
DecompressingEntity(org.apache.http.HttpEntity wrapped,
InputStreamFactory inputStreamFactory)
Creates a new
DecompressingEntity. |
| Modifier and Type | Method and Description |
|---|---|
java.io.InputStream |
getContent() |
org.apache.http.Header |
getContentEncoding() |
long |
getContentLength() |
private java.io.InputStream |
getDecompressingStream() |
void |
writeTo(java.io.OutputStream outStream) |
private static final int BUFFER_SIZE
private final InputStreamFactory inputStreamFactory
private java.io.InputStream content
getContent() method must return the same InputStream
instance when DecompressingEntity is wrapping a streaming entity.public DecompressingEntity(org.apache.http.HttpEntity wrapped,
InputStreamFactory inputStreamFactory)
DecompressingEntity.wrapped - the non-null HttpEntity to be wrappedinputStreamFactory - factory to create decompressing stream.private java.io.InputStream getDecompressingStream()
throws java.io.IOException
java.io.IOExceptionpublic java.io.InputStream getContent()
throws java.io.IOException
getContent in interface org.apache.http.HttpEntitygetContent in class org.apache.http.entity.HttpEntityWrapperjava.io.IOExceptionpublic void writeTo(java.io.OutputStream outStream)
throws java.io.IOException
writeTo in interface org.apache.http.HttpEntitywriteTo in class org.apache.http.entity.HttpEntityWrapperjava.io.IOExceptionpublic org.apache.http.Header getContentEncoding()
getContentEncoding in interface org.apache.http.HttpEntitygetContentEncoding in class org.apache.http.entity.HttpEntityWrapperpublic long getContentLength()
getContentLength in interface org.apache.http.HttpEntitygetContentLength in class org.apache.http.entity.HttpEntityWrapper