|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.portal.common.util.MediaType
@Deprecated public final class MediaType
This class is going to be removed any time soon in favoir of org.jboss.portal.common.net.media.MediaType This is a immutable wrapper to the activation MimeTpye.
This class contains some extensions to the activation MimeType, such as the typesafe enum pattern, and allows for a mime type to specify allowed sub types.
see also ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/| Field Summary | |
|---|---|
static MediaType |
ANY
Deprecated. Mime type 'Any' maps to an accept mime type of '*.*' (used by IE for css, images, etc.) |
static MediaType |
CSS
Deprecated. Mime type css |
static MediaType |
FORM
Deprecated. Mime type form (application/x-www-form-urlencoded) |
static MediaType |
GIF
Deprecated. Mime type gif |
static MediaType |
HTML
Deprecated. Mime type html |
static MediaType |
ICO
Deprecated. Mime type ico (see http://filext.com/detaillist.php?extdetail=ICO) |
static MediaType |
JPEG
Deprecated. Mime type jpeg |
static MediaType |
JS
Deprecated. Mime type js |
static MediaType |
PNG
Deprecated. Mime type png |
static MediaType |
RSS
Deprecated. Mime type rss |
static MediaType |
SVG
Deprecated. Mime type svg |
static MediaType |
TEXT
Deprecated. Mime type text |
static MediaType |
WBMP
Deprecated. Mime type wbmp |
static MediaType |
WML
Deprecated. Mime type wml |
static MediaType |
XHTML
Deprecated. Mime type xhtml |
static MediaType |
XML
Deprecated. Mime type xml |
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
Deprecated. compare the parameter with this instance and see if they are equals. |
java.util.List |
getAllowedSubTypes()
Deprecated. Get a list of allowed sub types for for this mime type. |
static java.util.List |
getAllowedSubTypes(MediaType mimeType)
Deprecated. Get a list of allowed sub types for the passed mime type. |
int |
hashCode()
Deprecated. Get the hascode for this mime type. |
boolean |
isAllowedSubType(MediaType other)
Deprecated. Return true if the allowed sub types contains the specified media type. |
static MediaType |
parseMimeType(java.lang.String mimeType)
Deprecated. Get the mime type for the presented string, if the string contains a valid mime type. |
static MediaType |
parseMimeTypeByExtension(java.lang.String extension)
Deprecated. Get the mime type for the presented string. |
java.lang.String |
toString()
Deprecated. Get the String representation of the mime type (i.e. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final MediaType ANY
public static final MediaType XHTML
public static final MediaType HTML
public static final MediaType FORM
public static final MediaType XML
public static final MediaType WML
public static final MediaType CSS
public static final MediaType TEXT
public static final MediaType JS
public static final MediaType SVG
public static final MediaType JPEG
public static final MediaType GIF
public static final MediaType PNG
public static final MediaType WBMP
public static final MediaType RSS
public static final MediaType ICO
| Method Detail |
|---|
public static MediaType parseMimeType(java.lang.String mimeType)
throws javax.activation.MimeTypeParseException
mimeType - the java.lang.String to parse into a RegistryMimeTpye
RegistryMimeTpye that matches with the presented string
javax.activation.MimeTypeParseException - if the presented mimetype is not supported
java.lang.IllegalArgumentException - if the presented string is null or empty
public static MediaType parseMimeTypeByExtension(java.lang.String extension)
throws javax.activation.MimeTypeParseException
The string is handles as a file name extension. example: 'xml' returns MediaType.XML
extension - the java.lang.String to parse into a RegistryMimeTpye
RegistryMimeTpye that matches with the presented string
javax.activation.MimeTypeParseException - if the presented mimetype is not supported
java.lang.IllegalArgumentException - if the presented string is null or emptypublic static java.util.List getAllowedSubTypes(MediaType mimeType)
mimeType - the RegistryMimeTpye to get the list of allowed subtypes for
java.util.List of PortalMimeTpyespublic java.util.List getAllowedSubTypes()
java.util.List of RegistryMimeTpyespublic boolean isAllowedSubType(MediaType other)
other - the sub type to test
public java.lang.String toString()
toString in class java.lang.Objectjava.lang.StringObject.toString()public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - the Object to compare this instance to
Object.equals(java.lang.Object)public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||