|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.portal.common.net.media.MediaType
public final class MediaType
An immutable media type class.
| Field Summary | |
|---|---|
static MediaType |
APPLICATION_X_WWW_FORM_URLENCODED
. |
static MediaType |
MULTIPART_FORM_DATA_MEDIA_TYPE
. |
static MediaType |
TEXT_CSS
. |
static MediaType |
TEXT_HTML
. |
static MediaType |
TEXT_JAVASCRIPT
. |
| Method Summary | |
|---|---|
static MediaType |
create(java.lang.String mediaTypeName)
Create a media type object by parsing a media type name. |
static MediaType |
create(java.lang.String typeName,
java.lang.String subtypeName)
Create a media type object by using the provided type name and subtype name. |
static MediaType |
create(TypeDef type,
SubtypeDef subtype)
Create a media type object using the provided type and subtype objects. |
boolean |
equals(java.lang.Object obj)
|
SubtypeDef |
getSubtype()
|
TypeDef |
getType()
|
java.lang.String |
getValue()
Returns the value which is a concatenation ofthe type name, a slash char and the subtype name. |
int |
hashCode()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final MediaType TEXT_HTML
public static final MediaType TEXT_JAVASCRIPT
public static final MediaType TEXT_CSS
public static final MediaType APPLICATION_X_WWW_FORM_URLENCODED
public static final MediaType MULTIPART_FORM_DATA_MEDIA_TYPE
| Method Detail |
|---|
public static MediaType create(java.lang.String mediaTypeName)
throws java.lang.IllegalArgumentException
mediaTypeName - the media type name value
java.lang.IllegalArgumentException - if the argument is null or is not valid
public static MediaType create(java.lang.String typeName,
java.lang.String subtypeName)
throws java.lang.IllegalArgumentException
typeName - the type namesubtypeName - the subtype name
java.lang.IllegalArgumentException - if any argument is null or not valid
public static MediaType create(TypeDef type,
SubtypeDef subtype)
throws java.lang.IllegalArgumentException
type - the typesubtype - the subtype
java.lang.IllegalArgumentException - if any argument is nullpublic TypeDef getType()
public SubtypeDef getSubtype()
public java.lang.String getValue()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||