org.apache.http.entity
Class HttpEntityWrapperHC4
java.lang.Object
org.apache.http.entity.HttpEntityWrapperHC4
- All Implemented Interfaces:
- org.apache.http.HttpEntity
- Direct Known Subclasses:
- BufferedHttpEntityHC4, DeflateDecompressingEntity, GzipCompressingEntity, GzipDecompressingEntity
@NotThreadSafe
public class HttpEntityWrapperHC4
- extends java.lang.Object
- implements org.apache.http.HttpEntity
Base class for wrapping entities.
Keeps a wrappedEntity and delegates all
calls to it. Implementations of wrapping entities can derive
from this class and need to override only those methods that
should not be delegated to the wrapped entity.
- Since:
- 4.0
|
Field Summary |
protected org.apache.http.HttpEntity |
wrappedEntity
The wrapped entity. |
|
Constructor Summary |
HttpEntityWrapperHC4(org.apache.http.HttpEntity wrappedEntity)
Creates a new entity wrapper. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
wrappedEntity
protected org.apache.http.HttpEntity wrappedEntity
- The wrapped entity.
HttpEntityWrapperHC4
public HttpEntityWrapperHC4(org.apache.http.HttpEntity wrappedEntity)
- Creates a new entity wrapper.
isRepeatable
public boolean isRepeatable()
- Specified by:
isRepeatable in interface org.apache.http.HttpEntity
isChunked
public boolean isChunked()
- Specified by:
isChunked in interface org.apache.http.HttpEntity
getContentLength
public long getContentLength()
- Specified by:
getContentLength in interface org.apache.http.HttpEntity
getContentType
public org.apache.http.Header getContentType()
- Specified by:
getContentType in interface org.apache.http.HttpEntity
getContentEncoding
public org.apache.http.Header getContentEncoding()
- Specified by:
getContentEncoding in interface org.apache.http.HttpEntity
getContent
public java.io.InputStream getContent()
throws java.io.IOException
- Specified by:
getContent in interface org.apache.http.HttpEntity
- Throws:
java.io.IOException
writeTo
public void writeTo(java.io.OutputStream outstream)
throws java.io.IOException
- Specified by:
writeTo in interface org.apache.http.HttpEntity
- Throws:
java.io.IOException
isStreaming
public boolean isStreaming()
- Specified by:
isStreaming in interface org.apache.http.HttpEntity
consumeContent
@Deprecated
public void consumeContent()
throws java.io.IOException
- Deprecated. (4.1) Either use
getContent() and call InputStream.close() on that;
otherwise call writeTo(OutputStream) which is required to free the resources.
- Specified by:
consumeContent in interface org.apache.http.HttpEntity
- Throws:
java.io.IOException