Package de.sfuhrm.radiorecorder.metadata
Enum MimeType
- java.lang.Object
-
- java.lang.Enum<MimeType>
-
- de.sfuhrm.radiorecorder.metadata.MimeType
-
- All Implemented Interfaces:
Serializable,Comparable<MimeType>
public enum MimeType extends Enum<MimeType>
Mime types for use in the application.- Author:
- Stephan Fuhrmann
-
-
Enum Constant Summary
Enum Constants Enum Constant Description APPLICATION_OGGAPPLICATION_PLS_XMLAUDIO_MPEGAUDIO_MPEGURLAUDIO_OGGAUDIO_XMPEGURLAUDIO_XMSWMAAUDIO_XSCPLSAUDIO_XWAV
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Optional<MimeType>byContentType(String contentType)Finds the mime type by content type.static MimeTypevalueOf(String name)Returns the enum constant of this type with the specified name.static MimeType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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
-
-
Method Detail
-
values
public static MimeType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MimeType c : MimeType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MimeType 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.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- 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
Optionalwith the possibility of an empty Optional if not found.
-
-