@NotThreadSafe public abstract class AbstractHttpEntityHC4 extends java.lang.Object implements org.apache.http.HttpEntity
HttpEntity.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
chunked |
protected org.apache.http.Header |
contentEncoding |
protected org.apache.http.Header |
contentType |
protected static int |
OUTPUT_BUFFER_SIZE
Buffer size for output stream processing.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractHttpEntityHC4()
Protected default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
consumeContent()
Deprecated.
(4.1) Either use
HttpEntity.getContent() and call InputStream.close() on that;
otherwise call HttpEntity.writeTo(java.io.OutputStream) which is required to free the resources. |
org.apache.http.Header |
getContentEncoding()
Obtains the Content-Encoding header.
|
org.apache.http.Header |
getContentType()
Obtains the Content-Type header.
|
boolean |
isChunked()
Obtains the 'chunked' flag.
|
void |
setChunked(boolean b)
Specifies the 'chunked' flag.
|
void |
setContentEncoding(org.apache.http.Header contentEncoding)
Specifies the Content-Encoding header.
|
void |
setContentEncoding(java.lang.String ceString)
Specifies the Content-Encoding header, as a string.
|
void |
setContentType(org.apache.http.Header contentType)
Specifies the Content-Type header.
|
void |
setContentType(java.lang.String ctString)
Specifies the Content-Type header, as a string.
|
protected static final int OUTPUT_BUFFER_SIZE
protected org.apache.http.Header contentType
protected org.apache.http.Header contentEncoding
protected boolean chunked
protected AbstractHttpEntityHC4()
null, null and false, respectively.public org.apache.http.Header getContentType()
contentType attribute.getContentType in interface org.apache.http.HttpEntitynullpublic org.apache.http.Header getContentEncoding()
contentEncoding attribute.getContentEncoding in interface org.apache.http.HttpEntitynullpublic boolean isChunked()
chunked attribute.isChunked in interface org.apache.http.HttpEntitypublic void setContentType(org.apache.http.Header contentType)
contentType attribute.contentType - the new Content-Encoding header, or
null to unsetpublic void setContentType(java.lang.String ctString)
setContentType(Header).ctString - the new Content-Type header, or
null to unsetpublic void setContentEncoding(org.apache.http.Header contentEncoding)
contentEncoding attribute.contentEncoding - the new Content-Encoding header, or
null to unsetpublic void setContentEncoding(java.lang.String ceString)
setContentEncoding(Header).ceString - the new Content-Encoding header, or
null to unsetpublic void setChunked(boolean b)
Note that the chunked setting is a hint only. If using HTTP/1.0, chunking is never performed. Otherwise, even if chunked is false, HttpClient must use chunk coding if the entity content length is unknown (-1).
The default implementation sets the value of the
chunked attribute.
b - the new 'chunked' flag@Deprecated
public void consumeContent()
throws java.io.IOException
HttpEntity.getContent() and call InputStream.close() on that;
otherwise call HttpEntity.writeTo(java.io.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.