public class ContentTypeFieldLenientImpl extends AbstractField implements ContentTypeField
Content-Type field.| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
mediaType |
private java.lang.String |
mimeType |
private java.util.Map<java.lang.String,java.lang.String> |
parameters |
private boolean |
parsed |
static FieldParser<ContentTypeField> |
PARSER |
private java.lang.String |
subType |
monitor, rawFieldPARAM_BOUNDARY, PARAM_CHARSET, TYPE_MESSAGE_RFC822, TYPE_MULTIPART_DIGEST, TYPE_MULTIPART_PREFIX, TYPE_TEXT_PLAIN| Constructor and Description |
|---|
ContentTypeFieldLenientImpl(Field rawField,
DecodeMonitor monitor) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getBoundary()
Gets the value of the
boundary parameter if set. |
java.lang.String |
getCharset()
Gets the value of the
charset parameter if set. |
java.lang.String |
getMediaType()
Gets the media type defined in this Content-Type field.
|
java.lang.String |
getMimeType()
Gets the MIME type defined in this Content-Type field.
|
java.lang.String |
getParameter(java.lang.String name)
Gets the value of a parameter.
|
java.util.Map<java.lang.String,java.lang.String> |
getParameters()
Gets all parameters.
|
java.lang.String |
getSubType()
Gets the subtype defined in this Content-Type field.
|
boolean |
isMimeType(java.lang.String mimeType)
Determines if the MIME type of this field matches the given one.
|
boolean |
isMultipart()
Determines if the MIME type of this field is
multipart/*. |
private void |
parse() |
getBody, getName, getParseException, getRaw, getRawField, isValidField, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetParseException, isValidFieldprivate boolean parsed
private java.lang.String mimeType
private java.lang.String mediaType
private java.lang.String subType
private final java.util.Map<java.lang.String,java.lang.String> parameters
public static final FieldParser<ContentTypeField> PARSER
ContentTypeFieldLenientImpl(Field rawField, DecodeMonitor monitor)
public java.lang.String getMimeType()
ContentTypeFieldgetMimeType in interface ContentTypeFieldpublic java.lang.String getMediaType()
ContentTypeFieldgetMediaType in interface ContentTypeFieldpublic java.lang.String getSubType()
ContentTypeFieldgetSubType in interface ContentTypeFieldpublic java.lang.String getParameter(java.lang.String name)
ContentTypeFieldgetParameter in interface ContentTypeFieldname - the name of the parameter to get.null if not set.public java.util.Map<java.lang.String,java.lang.String> getParameters()
ContentTypeFieldgetParameters in interface ContentTypeFieldpublic boolean isMimeType(java.lang.String mimeType)
ContentTypeFieldisMimeType in interface ContentTypeFieldmimeType - the MIME type to match against.true if the MIME type of this field matches,
false otherwise.public boolean isMultipart()
ContentTypeFieldmultipart/*.isMultipart in interface ContentTypeFieldtrue if this field is has a
multipart/* MIME type, false
otherwise.public java.lang.String getBoundary()
ContentTypeFieldboundary parameter if set.getBoundary in interface ContentTypeFieldboundary parameter value or null
if not set.public java.lang.String getCharset()
ContentTypeFieldcharset parameter if set.getCharset in interface ContentTypeFieldcharset parameter value or null
if not set.private void parse()