public abstract class AbstractContentBody extends java.lang.Object implements ContentBody
Modifier and Type | Field and Description |
---|---|
private org.apache.http.entity.ContentType |
contentType |
Constructor and Description |
---|
AbstractContentBody(org.apache.http.entity.ContentType contentType) |
AbstractContentBody(java.lang.String mimeType)
Deprecated.
(4.3) use
AbstractContentBody(ContentType) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCharset()
The body descriptors character set, defaulted appropriately for the MIME type.
|
org.apache.http.entity.ContentType |
getContentType() |
java.lang.String |
getMediaType()
Gets the defaulted MIME media type for this content.
|
java.lang.String |
getMimeType()
Returns the body descriptors MIME type.
|
java.lang.String |
getSubType()
Gets the defaulted MIME sub type for this content.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFilename, writeTo
getContentLength, getTransferEncoding
public AbstractContentBody(org.apache.http.entity.ContentType contentType)
@Deprecated public AbstractContentBody(java.lang.String mimeType)
AbstractContentBody(ContentType)
public org.apache.http.entity.ContentType getContentType()
public java.lang.String getMimeType()
ContentDescriptor
getMimeType
in interface ContentDescriptor
ContentDescriptor.getMediaType()
,
ContentDescriptor.getSubType()
public java.lang.String getMediaType()
ContentDescriptor
TEXT
, IMAGE
, MULTIPART
getMediaType
in interface ContentDescriptor
TEXT
)ContentDescriptor.getMimeType()
public java.lang.String getSubType()
ContentDescriptor
getSubType
in interface ContentDescriptor
PLAIN
)ContentDescriptor.getMimeType()
public java.lang.String getCharset()
ContentDescriptor
The body descriptors character set, defaulted appropriately for the MIME type.
For TEXT
types, this will be defaulted to us-ascii
.
For other types, when the charset parameter is missing this property will be null.
getCharset
in interface ContentDescriptor
TEXT
types, when unset will
be set to default us-ascii
. For other types, when unset,
null will be returned.