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.IOException
public java.io.InputStream getContent() throws java.io.IOException
getContent
in interface org.apache.http.HttpEntity
getContent
in class org.apache.http.entity.HttpEntityWrapper
java.io.IOException
public void writeTo(java.io.OutputStream outstream) throws java.io.IOException
writeTo
in interface org.apache.http.HttpEntity
writeTo
in class org.apache.http.entity.HttpEntityWrapper
java.io.IOException
public org.apache.http.Header getContentEncoding()
getContentEncoding
in interface org.apache.http.HttpEntity
getContentEncoding
in class org.apache.http.entity.HttpEntityWrapper
public long getContentLength()
getContentLength
in interface org.apache.http.HttpEntity
getContentLength
in class org.apache.http.entity.HttpEntityWrapper