|
|||||||||
| Home >> All >> org >> apache >> http >> [ entity overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.http.entity
Class AbstractHttpEntity

java.lang.Objectorg.apache.http.entity.AbstractHttpEntity
- All Implemented Interfaces:
- org.apache.http.HttpEntity
- Direct Known Subclasses:
- BasicHttpEntity, ByteArrayEntity, EntityTemplate, FileEntity, InputStreamEntity, StringEntity
- public abstract class AbstractHttpEntity
- extends java.lang.Object
- implements org.apache.http.HttpEntity
- extends java.lang.Object
Abstract base class for entities. Provides the commonly used attributes for streamed and self-contained implementations of HttpEntity.
- Since:
- 4.0
- Version:
- $Revision: 374897 $
| Field Summary | |
protected boolean |
chunked
The 'chunked' flag. |
protected org.apache.http.Header |
contentEncoding
The Content-Encoding header. |
protected org.apache.http.Header |
contentType
The Content-Type header. |
| Constructor Summary | |
protected |
AbstractHttpEntity()
Protected default constructor. |
| Method Summary | |
void |
consumeContent()
Does not consume anything. |
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.http.HttpEntity |
getContent, getContentLength, isRepeatable, isStreaming, writeTo |
| Field Detail |
contentType
protected org.apache.http.Header contentType
- The Content-Type header.
Returned by getContentType 55 ,
unless that method is overridden.
contentEncoding
protected org.apache.http.Header contentEncoding
- The Content-Encoding header.
Returned by getContentEncoding 55 ,
unless that method is overridden.
chunked
protected boolean chunked
- The 'chunked' flag.
Returned by isChunked 55 ,
unless that method is overridden.
| Constructor Detail |
AbstractHttpEntity
protected AbstractHttpEntity()
- Protected default constructor.
The attributes of the created object remain
nullandfalse, respectively.
| Method Detail |
getContentType
public org.apache.http.Header getContentType()
- Obtains the Content-Type header.
The default implementation returns the value of the
contentType 55 attribute.
- Specified by:
getContentTypein interfaceorg.apache.http.HttpEntity
getContentEncoding
public org.apache.http.Header getContentEncoding()
- Obtains the Content-Encoding header.
The default implementation returns the value of the
contentEncoding 55 attribute.
- Specified by:
getContentEncodingin interfaceorg.apache.http.HttpEntity
isChunked
public boolean isChunked()
- Obtains the 'chunked' flag.
The default implementation returns the value of the
chunked 55 attribute.
- Specified by:
isChunkedin interfaceorg.apache.http.HttpEntity
setContentType
public void setContentType(org.apache.http.Header contentType)
- Specifies the Content-Type header.
The default implementation sets the value of the
contentType 55 attribute.
setContentType
public void setContentType(java.lang.String ctString)
- Specifies the Content-Type header, as a string.
The default implementation calls
setContentType(Header) 55 .
setContentEncoding
public void setContentEncoding(org.apache.http.Header contentEncoding)
- Specifies the Content-Encoding header.
The default implementation sets the value of the
contentEncoding 55 attribute.
setContentEncoding
public void setContentEncoding(java.lang.String ceString)
- Specifies the Content-Encoding header, as a string.
The default implementation calls
setContentEncoding(Header) 55 .
setChunked
public void setChunked(boolean b)
- Specifies the 'chunked' flag.
The default implementation sets the value of the
chunked 55 attribute.
consumeContent
public void consumeContent()
throws java.io.IOException,
java.lang.UnsupportedOperationException
- Does not consume anything.
The default implementation does nothing if
isStreaming 55
returns
false, and throws an exception if it returnstrue. This removes the burden of implementing an empty method for non-streaming entities.- Specified by:
consumeContentin interfaceorg.apache.http.HttpEntity
|
|||||||||
| Home >> All >> org >> apache >> http >> [ entity overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.apache.http.entity.AbstractHttpEntity