Class ContentTypeFieldLenientImpl
java.lang.Object
org.apache.james.mime4j.field.AbstractField
org.apache.james.mime4j.field.ContentTypeFieldLenientImpl
- All Implemented Interfaces:
ContentTypeField, ParsedField, Field
Represents a
Content-Type field.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate Stringprivate booleanstatic final FieldParser<ContentTypeField> private StringFields inherited from class AbstractField
monitor, rawFieldFields inherited from interface ContentTypeField
PARAM_BOUNDARY, PARAM_CHARSET, TYPE_MESSAGE_RFC822, TYPE_MULTIPART_DIGEST, TYPE_MULTIPART_PREFIX, TYPE_TEXT_PLAIN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the value of theboundaryparameter if set.Gets the value of thecharsetparameter if set.Gets the media type defined in this Content-Type field.Gets the MIME type defined in this Content-Type field.getParameter(String name) Gets the value of a parameter.Gets all parameters.Gets the subtype defined in this Content-Type field.booleanisMimeType(String mimeType) Determines if the MIME type of this field matches the given one.booleanDetermines if the MIME type of this field ismultipart/*.private voidparse()Methods inherited from class AbstractField
getBody, getName, getNameLowerCase, getParseException, getRaw, getRawField, isValidField, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ContentTypeField
bodyDescriptionFieldMethods inherited from interface Field
getBody, getName, getNameLowerCase, getRawMethods inherited from interface ParsedField
getParseException, isValidField
-
Field Details
-
parsed
private boolean parsed -
mimeType
-
mediaType
-
subType
-
parameters
-
PARSER
-
-
Constructor Details
-
ContentTypeFieldLenientImpl
ContentTypeFieldLenientImpl(Field rawField, DecodeMonitor monitor)
-
-
Method Details
-
getMimeType
Description copied from interface:ContentTypeFieldGets the MIME type defined in this Content-Type field.- Specified by:
getMimeTypein interfaceContentTypeField- Returns:
- the MIME type or an empty string if not set.
-
getMediaType
Description copied from interface:ContentTypeFieldGets the media type defined in this Content-Type field.- Specified by:
getMediaTypein interfaceContentTypeField
-
getSubType
Description copied from interface:ContentTypeFieldGets the subtype defined in this Content-Type field.- Specified by:
getSubTypein interfaceContentTypeField
-
getParameter
Description copied from interface:ContentTypeFieldGets the value of a parameter. Parameter names are case-insensitive.- Specified by:
getParameterin interfaceContentTypeField- Parameters:
name- the name of the parameter to get.- Returns:
- the parameter value or
nullif not set.
-
getParameters
Description copied from interface:ContentTypeFieldGets all parameters.- Specified by:
getParametersin interfaceContentTypeField- Returns:
- the parameters.
-
isMimeType
Description copied from interface:ContentTypeFieldDetermines if the MIME type of this field matches the given one.- Specified by:
isMimeTypein interfaceContentTypeField- Parameters:
mimeType- the MIME type to match against.- Returns:
trueif the MIME type of this field matches,falseotherwise.
-
isMultipart
public boolean isMultipart()Description copied from interface:ContentTypeFieldDetermines if the MIME type of this field ismultipart/*.- Specified by:
isMultipartin interfaceContentTypeField- Returns:
trueif this field is has amultipart/*MIME type,falseotherwise.
-
getBoundary
Description copied from interface:ContentTypeFieldGets the value of theboundaryparameter if set.- Specified by:
getBoundaryin interfaceContentTypeField- Returns:
- the
boundaryparameter value ornullif not set.
-
getCharset
Description copied from interface:ContentTypeFieldGets the value of thecharsetparameter if set.- Specified by:
getCharsetin interfaceContentTypeField- Returns:
- the
charsetparameter value ornullif not set.
-
parse
private void parse()
-