@NotThreadSafe public class HttpEntityWrapperHC4 extends java.lang.Object implements org.apache.http.HttpEntity
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.| Modifier and Type | Field and Description |
|---|---|
protected org.apache.http.HttpEntity |
wrappedEntity
The wrapped entity.
|
| Constructor and Description |
|---|
HttpEntityWrapperHC4(org.apache.http.HttpEntity wrappedEntity)
Creates a new entity wrapper.
|
| Modifier and Type | Method and Description |
|---|---|
void |
consumeContent()
Deprecated.
(4.1) Either use
getContent() and call InputStream.close() on that;
otherwise call writeTo(OutputStream) which is required to free the resources. |
java.io.InputStream |
getContent() |
org.apache.http.Header |
getContentEncoding() |
long |
getContentLength() |
org.apache.http.Header |
getContentType() |
boolean |
isChunked() |
boolean |
isRepeatable() |
boolean |
isStreaming() |
void |
writeTo(java.io.OutputStream outstream) |
public HttpEntityWrapperHC4(org.apache.http.HttpEntity wrappedEntity)
public boolean isRepeatable()
isRepeatable in interface org.apache.http.HttpEntitypublic boolean isChunked()
isChunked in interface org.apache.http.HttpEntitypublic long getContentLength()
getContentLength in interface org.apache.http.HttpEntitypublic org.apache.http.Header getContentType()
getContentType in interface org.apache.http.HttpEntitypublic org.apache.http.Header getContentEncoding()
getContentEncoding in interface org.apache.http.HttpEntitypublic java.io.InputStream getContent()
throws java.io.IOException
getContent in interface org.apache.http.HttpEntityjava.io.IOExceptionpublic void writeTo(java.io.OutputStream outstream)
throws java.io.IOException
writeTo in interface org.apache.http.HttpEntityjava.io.IOExceptionpublic boolean isStreaming()
isStreaming in interface org.apache.http.HttpEntity@Deprecated
public void consumeContent()
throws java.io.IOException
getContent() and call InputStream.close() on that;
otherwise call writeTo(OutputStream) which is required to free the resources.consumeContent in interface org.apache.http.HttpEntityjava.io.IOExceptionCopyright © 1999-2015 The Apache Software Foundation. All rights reserved.