public abstract class AbstractContentBody extends Object implements ContentBody
Constructor and Description |
---|
AbstractContentBody(ContentType contentType) |
Modifier and Type | Method and Description |
---|---|
String |
getCharset()
The body descriptors character set, defaulted appropriately for the MIME type.
|
ContentType |
getContentType() |
String |
getMediaType()
Gets the defaulted MIME media type for this content.
|
String |
getMimeType()
Returns the body descriptors MIME type.
|
String |
getSubType()
Gets the defaulted MIME sub type for this content.
|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFilename, writeTo
getContentLength
public AbstractContentBody(ContentType contentType)
public 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.public ContentType getContentType()
public String getMediaType()
ContentDescriptor
TEXT
, IMAGE
, MULTIPART
getMediaType
in interface ContentDescriptor
TEXT
)ContentDescriptor.getMimeType()
public String getMimeType()
ContentDescriptor
getMimeType
in interface ContentDescriptor
ContentDescriptor.getMediaType()
,
ContentDescriptor.getSubType()
public String getSubType()
ContentDescriptor
getSubType
in interface ContentDescriptor
PLAIN
)ContentDescriptor.getMimeType()