| java.lang.Object | |
| ↳ | com.google.code.javax.mail.internet.ContentType |
This class represents a MIME ContentType value. It provides methods to parse a ContentType string into individual components and to generate a MIME style ContentType string.
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| list | |||||||||||
| primaryType | |||||||||||
| subType | |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
No-arg Constructor.
| |||||||||||
Constructor.
| |||||||||||
Constructor that takes a Content-Type string.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Return the MIME type string, without the parameters.
| |||||||||||
Return the specified parameter value.
| |||||||||||
Return a ParameterList object that holds all the available
parameters.
| |||||||||||
Return the primary type.
| |||||||||||
Return the subType.
| |||||||||||
Match with the specified ContentType object.
| |||||||||||
Match with the specified content-type string.
| |||||||||||
Set the specified parameter.
| |||||||||||
Set a new ParameterList.
| |||||||||||
Set the primary type.
| |||||||||||
Set the subType.
| |||||||||||
Retrieve a RFC2045 style string representation of
this Content-Type.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
No-arg Constructor.
Constructor.
| primaryType | Primary type |
|---|---|
| subType | SubType |
| list | ParameterList |
Constructor that takes a Content-Type string. The String is parsed into its constituents: primaryType, subType and parameters. A ParseException is thrown if the parse fails.
| s | The Content-Type string. |
|---|
| ParseException | if the parse fails. |
|---|
Return the MIME type string, without the parameters. The returned value is basically the concatenation of the primaryType, the '/' character and the secondaryType.
Return the specified parameter value. Returns null
if this parameter is absent.
| name |
|---|
Return a ParameterList object that holds all the available parameters. Returns null if no parameters are available.
Return the primary type.
Return the subType.
Match with the specified ContentType object. This method
compares only the primaryType and
subType . The parameters of both operands
are ignored.
For example, this method will return true when
comparing the ContentTypes for "text/plain"
and "text/plain; charset=foobar".
If the subType of either operand is the special
character '*', then the subtype is ignored during the match.
For example, this method will return true when
comparing the ContentTypes for "text/plain"
and "text/*"
| cType | ContentType to compare this against |
|---|
Match with the specified content-type string. This method
compares only the primaryType and
subType .
The parameters of both operands are ignored.
For example, this method will return true when
comparing the ContentType for "text/plain"
with "text/plain; charset=foobar".
If the subType of either operand is the special
character '*', then the subtype is ignored during the match.
For example, this method will return true when
comparing the ContentType for "text/plain"
with "text/*"
| s |
|---|
Set the specified parameter. If this parameter already exists, it is replaced by this new value.
| name | Parameter name |
|---|---|
| value | Parameter value |
Set a new ParameterList.
| list | ParameterList |
|---|
Set the primary type. Overrides existing primary type.
| primaryType | Primary type |
|---|
Set the subType. Replaces the existing subType.
| subType | The subType |
|---|
Retrieve a RFC2045 style string representation of
this Content-Type. Returns null if
the conversion failed.