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 MutableBodyDescriptor
field
- the MIME field.public java.lang.String getMimeType()
getMimeType
in interface ContentDescriptor
ContentDescriptor.getMediaType()
,
ContentDescriptor.getSubType()
public java.lang.String getBoundary()
getBoundary
in interface BodyDescriptor
public java.lang.String getCharset()
getCharset
in interface ContentDescriptor
public java.util.Map<java.lang.String,java.lang.String> getContentTypeParameters()
getContentTypeParameters
in interface ContentDescriptor
public java.lang.String getTransferEncoding()
getTransferEncoding
in interface ContentDescriptor
public java.lang.String toString()
toString
in class java.lang.Object
public long getContentLength()
ContentDescriptor
getContentLength
in interface ContentDescriptor
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()
Copyright © 2004-2012. All Rights Reserved.