public class DefaultBodyDescriptor extends java.lang.Object implements MutableBodyDescriptor
Content-).| Constructor and Description |
|---|
DefaultBodyDescriptor()
Creates a new root
BodyDescriptor instance. |
DefaultBodyDescriptor(BodyDescriptor parent)
Creates a new
BodyDescriptor instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
addField(Field field)
Should be called for each
Content- header field of
a MIME message or part. |
java.lang.String |
getBoundary()
Return the boundary
|
java.lang.String |
getCharset()
Return the charset
|
long |
getContentLength()
Returns the body descriptors content-length.
|
java.util.Map<java.lang.String,java.lang.String> |
getContentTypeParameters()
Return all parameters for the BodyDescriptor
|
java.lang.String |
getMediaType()
Gets the defaulted MIME media type for this content.
|
java.lang.String |
getMimeType()
Return the MimeType
|
java.lang.String |
getSubType()
Gets the defaulted MIME sub type for this content.
|
java.lang.String |
getTransferEncoding()
Return the TransferEncoding
|
java.lang.String |
toString() |
public DefaultBodyDescriptor()
BodyDescriptor instance.public DefaultBodyDescriptor(BodyDescriptor parent)
BodyDescriptor instance.parent - the descriptor of the parent or null if this
is the root descriptor.public void addField(Field field)
Content- header field of
a MIME message or part.addField in interface MutableBodyDescriptorfield - the MIME field.public java.lang.String getMimeType()
getMimeType in interface ContentDescriptorContentDescriptor.getMediaType(),
ContentDescriptor.getSubType()public java.lang.String getBoundary()
getBoundary in interface BodyDescriptorpublic java.lang.String getCharset()
getCharset in interface ContentDescriptorpublic java.util.Map<java.lang.String,java.lang.String> getContentTypeParameters()
getContentTypeParameters in interface ContentDescriptorpublic java.lang.String getTransferEncoding()
getTransferEncoding in interface ContentDescriptorpublic java.lang.String toString()
toString in class java.lang.Objectpublic long getContentLength()
ContentDescriptorgetContentLength in interface ContentDescriptorpublic java.lang.String getMediaType()
ContentDescriptorTEXT, IMAGE, MULTIPARTgetMediaType in interface ContentDescriptorTEXT)ContentDescriptor.getMimeType()public java.lang.String getSubType()
ContentDescriptorgetSubType in interface ContentDescriptorPLAIN)ContentDescriptor.getMimeType()Copyright © 2004-2012. All Rights Reserved.