Enum Class MimeType

java.lang.Object
java.lang.Enum<MimeType>
de.sfuhrm.radiorecorder.metadata.MimeType
All Implemented Interfaces:
Serializable, Comparable<MimeType>, Constable

public enum MimeType extends Enum<MimeType>
Mime types for use in the application.
Author:
Stephan Fuhrmann
  • Enum Constant Details

    • AUDIO_MPEG

      public static final MimeType AUDIO_MPEG
      MIME type for audio/mpeg.
    • AUDIO_OGG

      public static final MimeType AUDIO_OGG
      MIME type for audio/ogg.
    • AUDIO_XWAV

      public static final MimeType AUDIO_XWAV
      MIME type for audio/x-wav.
    • AUDIO_XMSWMA

      public static final MimeType AUDIO_XMSWMA
      MIME type for audio/x-ms-wma.
    • AUDIO_MPEGURL

      public static final MimeType AUDIO_MPEGURL
      MIME type for audio/mpegurl.
    • AUDIO_XMPEGURL

      public static final MimeType AUDIO_XMPEGURL
      MIME type for audio/x-mpegurl.
    • AUDIO_XSCPLS

      public static final MimeType AUDIO_XSCPLS
      MIME type for audio/x-scpls.
    • APPLICATION_OGG

      public static final MimeType APPLICATION_OGG
      MIME type for application/ogg.
    • APPLICATION_PLS_XML

      public static final MimeType APPLICATION_PLS_XML
      MIME type for application/pls+xml.
    • AUDIO_AAC

      public static final MimeType AUDIO_AAC
      MIME type for audio/aac, audio/aacp or audio/mp4.
  • Method Details

    • values

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

      public static MimeType 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.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • byContentType

      public static Optional<MimeType> byContentType(String contentType)
      Finds the mime type by content type.
      Parameters:
      contentType - a content type String for example "audio/mpeg".
      Returns:
      the identified enum instance wrapped in an Optional with the possibility of an empty Optional if not found.