All Implemented Interfaces:
Serializable, Comparable<MediaType>, Constable

public enum MediaType extends Enum<MediaType> implements Serializable
Defines the type of media.
  • Enum Constant Details

    • Image

      public static final MediaType Image
      The media is an image.
    • Audio

      public static final MediaType Audio
      The media is an audio recording.
    • Document

      public static final MediaType Document
      The media is a text document, probably rich text.
    • Video

      public static final MediaType Video
      The media is a video recording.
    • Other

      public static final MediaType Other
      Another type of media, probably not supported.
  • Method Details

    • values

      public static MediaType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static MediaType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      name - the name of the enum constant to be returned.
      the enum constant with the specified name
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getOrdinal

      public int getOrdinal()
      Return the numerical value for the enum.
      int enum value ordinal
    • getDescription

      public String getDescription()
      Return the description for the enum.
      String description
    • getName

      public String getName()
      Return the descriptive name for the MediaType enum instance
      String name