Methods Summary |
---|
public void | consumeContent()Does not consume anything.
The default implementation does nothing if
{@link HttpEntity#isStreaming isStreaming}
returns false , and throws an exception
if it returns true .
This removes the burden of implementing
an empty method for non-streaming entities.
if (isStreaming()) {
throw new UnsupportedOperationException
("streaming entity does not implement consumeContent()");
}
|
public org.apache.http.Header | getContentEncoding()Obtains the Content-Encoding header.
The default implementation returns the value of the
{@link #contentEncoding contentEncoding} attribute.
return this.contentEncoding;
|
public org.apache.http.Header | getContentType()Obtains the Content-Type header.
The default implementation returns the value of the
{@link #contentType contentType} attribute.
return this.contentType;
|
public boolean | isChunked()Obtains the 'chunked' flag.
The default implementation returns the value of the
{@link #chunked chunked} attribute.
return this.chunked;
|
public void | setChunked(boolean b)Specifies the 'chunked' flag.
The default implementation sets the value of the
{@link #chunked chunked} attribute.
this.chunked = b;
|
public void | setContentEncoding(org.apache.http.Header contentEncoding)Specifies the Content-Encoding header.
The default implementation sets the value of the
{@link #contentEncoding contentEncoding} attribute.
this.contentEncoding = contentEncoding;
|
public void | setContentEncoding(java.lang.String ceString)Specifies the Content-Encoding header, as a string.
The default implementation calls
{@link #setContentEncoding(Header) setContentEncoding(Header)}.
Header h = null;
if (ceString != null) {
h = new BasicHeader(HTTP.CONTENT_ENCODING, ceString);
}
setContentEncoding(h);
|
public void | setContentType(org.apache.http.Header contentType)Specifies the Content-Type header.
The default implementation sets the value of the
{@link #contentType contentType} attribute.
this.contentType = contentType;
|
public void | setContentType(java.lang.String ctString)Specifies the Content-Type header, as a string.
The default implementation calls
{@link #setContentType(Header) setContentType(Header)}.
Header h = null;
if (ctString != null) {
h = new BasicHeader(HTTP.CONTENT_TYPE, ctString);
}
setContentType(h);
|