Enum MediaType
-
- All Implemented Interfaces:
public enum MediaTypeThe MediaType enumeration contains a list of media types.
Emil Ivov
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AUDIORepresents an AUDIO media type.
VIDEORepresents a VIDEO media type.
TEXTRepresents a TEXT media type. See RFC4103.
APPLICATIONRepresents an APPLICATION media type.
MESSAGERepresents a (chat-) MESSAGE media type.
IMAGERepresents an IMAGE media type. See RFC6466.
CONTROLRepresents a DATA media type.
DATARepresents a DATA media type.
-
Method Summary
Modifier and Type Method Description StringtoString()Returns the name of this MediaType (e.g. static MediaTypeparseString(String mediaTypeName)Returns a MediaType value corresponding to the specified mediaTypeName or in other words AUDIO, MESSAGE or VIDEO. static Array<MediaType>values()Returns an array containing the constants of this enum type, in the order they're declared. static MediaTypevalueOf(String name)Returns the enum constant of this type with the specified name. -
-
Method Detail
-
toString
String toString()
Returns the name of this MediaType (e.g. "audio", "message" or "video"). The name returned by this method is meant for use by session description mechanisms such as SIP/SDP or XMPP/Jingle.
- Returns:
the name of this MediaType (e.g. "audio" or "video").
-
parseString
static MediaType parseString(String mediaTypeName)
Returns a MediaType value corresponding to the specified mediaTypeName or in other words AUDIO, MESSAGE or VIDEO.
- Parameters:
mediaTypeName- the name that we'd like to parse.- Returns:
a MediaType value corresponding to the specified mediaTypeName.
-
values
static Array<MediaType> values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.
- Returns:
an array containing the constants of this enum type, in the order they're declared
-
valueOf
static MediaType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
- Returns:
the enum constant with the specified name
-
-
-
-