Enum MediaType

  • All Implemented Interfaces:

    
    public enum MediaType
    
                        

    The MediaType enumeration contains a list of media types.

    Author:

    Emil Ivov

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      AUDIO

      Represents an AUDIO media type.

      VIDEO

      Represents a VIDEO media type.

      TEXT

      Represents a TEXT media type. See RFC4103.

      APPLICATION

      Represents an APPLICATION media type.

      MESSAGE

      Represents a (chat-) MESSAGE media type.

      IMAGE

      Represents an IMAGE media type. See RFC6466.

      CONTROL

      Represents a DATA media type.

      DATA

      Represents a DATA media type.

    • Method Summary

      Modifier and Type Method Description
      String toString() Returns the name of this MediaType (e.g.
      static MediaType parseString(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 MediaType valueOf(String name) Returns the enum constant of this type with the specified name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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