public enum MediaType extends java.lang.Enum<MediaType>
Enum Constant and Description |
---|
APPLICATION
Represents an APPLICATION media type.
|
AUDIO
Represents an AUDIO media type.
|
CONTROL
Deprecated.
In RFC4566. Still defined to avoid parsing errors.
|
DATA
Deprecated.
In RFC4566. Still defined to avoid parsing errors.
|
IMAGE
Represents an IMAGE media type.
|
MESSAGE
Represents a (chat-) MESSAGE media type.
|
TEXT
Represents a TEXT media type.
|
VIDEO
Represents a VIDEO media type.
|
Modifier and Type | Method and Description |
---|---|
static MediaType |
parseString(java.lang.String mediaTypeName)
Returns a MediaType value corresponding to the specified
mediaTypeName or in other words AUDIO, MESSAGE
or VIDEO.
|
java.lang.String |
toString()
Returns the name of this MediaType (e.g.
|
static MediaType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static MediaType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MediaType AUDIO
public static final MediaType VIDEO
public static final MediaType TEXT
public static final MediaType APPLICATION
public static final MediaType MESSAGE
public static final MediaType IMAGE
@Deprecated public static final MediaType CONTROL
@Deprecated public static final MediaType DATA
public static MediaType[] values()
for (MediaType c : MediaType.values()) System.out.println(c);
public static MediaType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String toString()
toString
in class java.lang.Enum<MediaType>
public static MediaType parseString(java.lang.String mediaTypeName) throws java.lang.IllegalArgumentException
mediaTypeName
- the name that we'd like to parse.java.lang.IllegalArgumentException
- in case mediaTypeName is not a
valid or currently supported media type.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.