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
    • AUDIO_OGG

      public static final MimeType AUDIO_OGG
    • AUDIO_XWAV

      public static final MimeType AUDIO_XWAV
    • AUDIO_XMSWMA

      public static final MimeType AUDIO_XMSWMA
    • AUDIO_MPEGURL

      public static final MimeType AUDIO_MPEGURL
    • AUDIO_XMPEGURL

      public static final MimeType AUDIO_XMPEGURL
    • AUDIO_XSCPLS

      public static final MimeType AUDIO_XSCPLS
    • APPLICATION_OGG

      public static final MimeType APPLICATION_OGG
    • APPLICATION_PLS_XML

      public static final MimeType APPLICATION_PLS_XML
    • AUDIO_AAC

      public static final MimeType AUDIO_AAC
  • 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.