|
Project JXTA | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.document.MimeMediaType
MIME Media Types are used to describe the format of data streams. MIME Media Types are defined by IETF RFC 2046 MIME : Media Types. This class manages parsing of Mime Media Types from strings and piecemeal construction of Mime Media Type descriptors.
Note : This implementation does not include support for the character encoding techniques described by : IETF RFC 2046 MIME : Media Types.
Document
,
StructuredDocument
,
StructuredDocumentFactory
,
StructuredTextDocument
,
Serialized FormField Summary | |
static MimeMediaType |
AOS
Common Mime Media Type for arbitrary unparsed data. |
static MimeMediaType |
TEXT_DEFAULTENCODING
Common Mime Media Type for text encoded using the default character encoding for this JVM. |
static MimeMediaType |
TEXTUTF8
Common Mime Media Type for plain text encoded as UTF-8 characters. |
static MimeMediaType |
XML_DEFAULTENCODING
Common Mime Media Type for XML encoded using the default character encoding for this JVM. |
static MimeMediaType |
XMLUTF8
Common Mime Media Type for XML encoded as UTF-8 characters. |
Constructor Summary | |
MimeMediaType(MimeMediaType type,
String params,
boolean replace)
Creates a new type/subtype MimeMediaType with the specified parameters. |
|
MimeMediaType(String mimetype)
Creates a new MimeMediaType |
|
MimeMediaType(String type,
String subtype)
Creates a new type/subtype MimeMediaType |
|
MimeMediaType(String type,
String subtype,
String parameters)
Creates a new type/subtype MimeMediaType |
Method Summary | |
boolean |
equals(Object obj)
|
boolean |
equalsIngoringParams(Object obj)
Similar to equals(Object) , but ignores any parameters. |
String |
getMimeMediaType()
Get the "root" mime-type/subtype without any of the parameters. |
String |
getParameter(String param)
Get the value of the first occurance of the specified parameter from the parameter list. |
String |
getSubtype()
Get the Subtype of the mime-type |
String |
getType()
Get type of the mime-type |
int |
hashCode()
|
MimeMediaType |
intern()
Returns a canonical representation for the MimeMediaType object. |
boolean |
isExperimentalSubtype()
Check if the mime-type is for debugging. |
boolean |
isExperimentalType()
Check if the mime-type is for provisional. |
String |
toString()
|
static MimeMediaType |
valueOf(String mimetype)
Returns a MimeMediaType with a value represented by the specified String. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final MimeMediaType AOS
public static final MimeMediaType TEXT_DEFAULTENCODING
file.encoding
".
The default encoding varies with host platform and locale. This
media type must not be used for any documents which
will be exchanged with other peers (as they may be using different
default character encodings).
public static final MimeMediaType TEXTUTF8
public static final MimeMediaType XML_DEFAULTENCODING
file.encoding
".
The default encoding varies with host platform and locale. This
media type must not be used for any documents which
will be exchanged with other peers (as they may be using different
default character encodings).
public static final MimeMediaType XMLUTF8
Constructor Detail |
public MimeMediaType(String mimetype)
mimetype
- string representing a mime-typepublic MimeMediaType(String type, String subtype)
type
- string representing a mime typesubtype
- string representing a mime subtypepublic MimeMediaType(String type, String subtype, String parameters)
type
- string representing a mime typesubtype
- string representing a mime subtypeparameters
- parameters to the mime-type constructorpublic MimeMediaType(MimeMediaType type, String params, boolean replace)
type
- the source mime typeparams
- parameters to the mime-type constructorreplace
- parameters if true then provided params should replace
existing params else they are accumulated.Method Detail |
public boolean equals(Object obj)
public boolean equalsIngoringParams(Object obj)
equals(Object)
, but ignores any parameters. Compares
only the type and sub-type.
public int hashCode()
public String toString()
public String getMimeMediaType()
public String getType()
public boolean isExperimentalType()
public String getSubtype()
public boolean isExperimentalSubtype()
public String getParameter(String param)
param
- the parameter to retrieve.
public static MimeMediaType valueOf(String mimetype)
new MimeMediaType( string ) != new MimeMediaType( string )
while for common types:
MimeMediaType.valueOf( string ) == MimeMediaType.valueOf( string )
public MimeMediaType intern()
|
JXTA J2SE | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |