javax.mail.internet
public class ContentType extends Object
Version: 1.3
Constructor Summary | |
---|---|
ContentType()
Constructor for an empty Content-Type. | |
ContentType(String primaryType, String subType, ParameterList list)
Constructor. | |
ContentType(String s)
Constructor that parses a Content-Type value from an RFC 2045 string
representation. |
Method Summary | |
---|---|
String | getBaseType()
Returns the MIME type string, without the parameters. |
String | getParameter(String name)
Returns the specified parameter value. |
ParameterList | getParameterList()
Returns the parameters. |
String | getPrimaryType()
Returns the primary type. |
String | getSubType()
Returns the subtype. |
boolean | match(ContentType cType)
Returns true if the specified Content-Type matches this Content-Type.
|
boolean | match(String s)
Returns true if the specified Content-Type matches this Content-Type.
|
void | setParameter(String name, String value)
Sets the specified parameter. |
void | setParameterList(ParameterList list)
Sets the parameters. |
void | setPrimaryType(String primaryType)
Sets the primary type. |
void | setSubType(String subType)
Sets the subtype. |
String | toString()
Returns an RFC 2045 string representation of this Content-Type. |
Parameters: primaryType the primary type subType the subtype list the parameters
Parameters: s the Content-Type value
Throws: ParseException if an error occurred during parsing
If the subtype of either Content-Type is the special character '*', the subtype is ignored during the match.
Parameters: cType the Content-Type for comparison
If the subtype of either Content-Type is the special character '*', the subtype is ignored during the match.
Parameters: s the RFC 2045 string representation of the Content-Type to match
Parameters: name the parameter name value the parameter value
Parameters: list the Parameter list