class BasicBodyDescriptor extends java.lang.Object implements BodyDescriptor
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
boundary |
private java.lang.String |
charset |
private long |
contentLength |
private java.lang.String |
mediaType |
private java.lang.String |
mimeType |
private java.lang.String |
subType |
private java.lang.String |
transferEncoding |
| Constructor and Description |
|---|
BasicBodyDescriptor(java.lang.String mimeType,
java.lang.String mediaType,
java.lang.String subType,
java.lang.String boundary,
java.lang.String charset,
java.lang.String transferEncoding,
long contentLength) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getBoundary()
Returns the body descriptors boundary.
|
java.lang.String |
getCharset()
The body descriptors character set, defaulted appropriately for the MIME type.
|
long |
getContentLength()
Returns the body descriptors content-length.
|
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.
|
java.lang.String |
getTransferEncoding()
Returns the body descriptors transfer encoding.
|
java.lang.String |
toString() |
private final java.lang.String mimeType
private final java.lang.String mediaType
private final java.lang.String subType
private final java.lang.String boundary
private final java.lang.String charset
private final java.lang.String transferEncoding
private final long contentLength
BasicBodyDescriptor(java.lang.String mimeType,
java.lang.String mediaType,
java.lang.String subType,
java.lang.String boundary,
java.lang.String charset,
java.lang.String transferEncoding,
long contentLength)
public java.lang.String getMimeType()
ContentDescriptorgetMimeType in interface ContentDescriptorContentDescriptor.getMediaType(),
ContentDescriptor.getSubType()public java.lang.String getMediaType()
ContentDescriptorTEXT, IMAGE, MULTIPARTgetMediaType in interface ContentDescriptorTEXT)ContentDescriptor.getMimeType()public java.lang.String getSubType()
ContentDescriptorgetSubType in interface ContentDescriptorPLAIN)ContentDescriptor.getMimeType()public java.lang.String getBoundary()
BodyDescriptorgetBoundary in interface BodyDescriptorpublic java.lang.String getCharset()
ContentDescriptorThe 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 ContentDescriptorTEXT types, when unset will
be set to default us-ascii. For other types, when unset,
null will be returned.public java.lang.String getTransferEncoding()
ContentDescriptorgetTransferEncoding in interface ContentDescriptorpublic long getContentLength()
ContentDescriptorgetContentLength in interface ContentDescriptorpublic java.lang.String toString()
toString in class java.lang.Object