public class ContentTypeFieldLenientImpl extends AbstractField implements ContentTypeField
Content-Type
field.Modifier and Type | Field and Description |
---|---|
static FieldParser<ContentTypeField> |
PARSER |
monitor, rawField
PARAM_BOUNDARY, PARAM_CHARSET, TYPE_MESSAGE_RFC822, TYPE_MULTIPART_DIGEST, TYPE_MULTIPART_PREFIX, TYPE_TEXT_PLAIN
Modifier and Type | Method and Description |
---|---|
String |
getBoundary()
Gets the value of the
boundary parameter if set. |
String |
getCharset()
Gets the value of the
charset parameter if set. |
String |
getMediaType()
Gets the media type defined in this Content-Type field.
|
String |
getMimeType()
Gets the MIME type defined in this Content-Type field.
|
String |
getParameter(String name)
Gets the value of a parameter.
|
Map<String,String> |
getParameters()
Gets all parameters.
|
String |
getSubType()
Gets the subtype defined in this Content-Type field.
|
boolean |
isMimeType(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/* . |
getBody, getName, getParseException, getRaw, getRawField, isValidField, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getParseException, isValidField
public static final FieldParser<ContentTypeField> PARSER
public String getMimeType()
ContentTypeField
getMimeType
in interface ContentTypeField
public String getMediaType()
ContentTypeField
getMediaType
in interface ContentTypeField
public String getSubType()
ContentTypeField
getSubType
in interface ContentTypeField
public String getParameter(String name)
ContentTypeField
getParameter
in interface ContentTypeField
name
- the name of the parameter to get.null
if not set.public Map<String,String> getParameters()
ContentTypeField
getParameters
in interface ContentTypeField
public boolean isMimeType(String mimeType)
ContentTypeField
isMimeType
in interface ContentTypeField
mimeType
- the MIME type to match against.true
if the MIME type of this field matches,
false
otherwise.public boolean isMultipart()
ContentTypeField
multipart/*
.isMultipart
in interface ContentTypeField
true
if this field is has a
multipart/*
MIME type, false
otherwise.public String getBoundary()
ContentTypeField
boundary
parameter if set.getBoundary
in interface ContentTypeField
boundary
parameter value or null
if not set.public String getCharset()
ContentTypeField
charset
parameter if set.getCharset
in interface ContentTypeField
charset
parameter value or null
if not set.Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.