|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.mail.internet.ContentType
A MIME Content-Type value.
Constructor Summary | |
ContentType()
Constructor for an empty Content-Type. |
|
ContentType(java.lang.String s)
Constructor that parses a Content-Type value from an RFC 2045 string representation. |
|
ContentType(java.lang.String primaryType,
java.lang.String subType,
ParameterList list)
Constructor. |
Method Summary | |
java.lang.String |
getBaseType()
Returns the MIME type string, without the parameters. |
java.lang.String |
getParameter(java.lang.String name)
Returns the specified parameter value. |
ParameterList |
getParameterList()
Returns the parameters. |
java.lang.String |
getPrimaryType()
Returns the primary type. |
java.lang.String |
getSubType()
Returns the subtype. |
boolean |
match(ContentType cType)
Returns true if the specified Content-Type matches this Content-Type. |
boolean |
match(java.lang.String s)
Returns true if the specified Content-Type matches this Content-Type. |
void |
setParameter(java.lang.String name,
java.lang.String value)
Sets the specified parameter. |
void |
setParameterList(ParameterList list)
Sets the parameters. |
void |
setPrimaryType(java.lang.String primaryType)
Sets the primary type. |
void |
setSubType(java.lang.String subType)
Sets the subtype. |
java.lang.String |
toString()
Returns an RFC 2045 string representation of this Content-Type. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ContentType()
public ContentType(java.lang.String primaryType, java.lang.String subType, ParameterList list)
primaryType
- the primary typesubType
- the subtypelist
- the parameterspublic ContentType(java.lang.String s) throws ParseException
s
- the Content-Type value
ParseException
- if an error occurred during parsingMethod Detail |
public java.lang.String getPrimaryType()
public java.lang.String getSubType()
public java.lang.String getBaseType()
public java.lang.String getParameter(java.lang.String name)
public ParameterList getParameterList()
public void setPrimaryType(java.lang.String primaryType)
public void setSubType(java.lang.String subType)
public void setParameter(java.lang.String name, java.lang.String value)
name
- the parameter namevalue
- the parameter valuepublic void setParameterList(ParameterList list)
list
- the Parameter listpublic java.lang.String toString()
public boolean match(ContentType cType)
If the subtype of either Content-Type is the special character '*', the subtype is ignored during the match.
cType
- the Content-Type for comparisonpublic boolean match(java.lang.String s)
If the subtype of either Content-Type is the special character '*', the subtype is ignored during the match.
s
- the RFC 2045 string representation of the Content-Type to match
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |