org.apache.james.mime4j.descriptor
public class DefaultBodyDescriptor extends 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. |
String |
getBoundary()
Return the boundary
|
String |
getCharset()
Return the charset
|
long |
getContentLength()
Returns the body descriptors content-length.
|
Map<String,String> |
getContentTypeParameters()
Return all parameters for the BodyDescriptor
|
String |
getMediaType()
Gets the defaulted MIME media type for this content.
|
String |
getMimeType()
Return the MimeType
|
String |
getSubType()
Gets the defaulted MIME sub type for this content.
|
String |
getTransferEncoding()
Return the TransferEncoding
|
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 String getMimeType()
getMimeType
in interface ContentDescriptor
ContentDescriptor.getMediaType()
,
ContentDescriptor.getSubType()
public String getBoundary()
getBoundary
in interface BodyDescriptor
public String getCharset()
getCharset
in interface ContentDescriptor
public Map<String,String> getContentTypeParameters()
getContentTypeParameters
in interface ContentDescriptor
public String getTransferEncoding()
getTransferEncoding
in interface ContentDescriptor
public long getContentLength()
ContentDescriptor
getContentLength
in interface ContentDescriptor
public String getMediaType()
ContentDescriptor
TEXT
, IMAGE
, MULTIPART
getMediaType
in interface ContentDescriptor
TEXT
)ContentDescriptor.getMimeType()
public String getSubType()
ContentDescriptor
getSubType
in interface ContentDescriptor
PLAIN
)ContentDescriptor.getMimeType()
Copyright © 2004–2014 The Apache Software Foundation. All rights reserved.