Package com.globalmentor.io
Class Audio
- java.lang.Object
-
- com.globalmentor.io.Audio
-
public class Audio extends java.lang.Object
Utilities and constants for working with audio content.- Author:
- Garret Wilson
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
AU_NAME_EXTENSION
The name extension for audio files.static java.lang.String
MP3_NAME_EXTENSION
The extension for MPEG 2 layer 3 (MP3) files.static ContentType
MPEG_CONTENT_TYPE
The content type for MP3:audio/mpeg
.static java.lang.String
OGG_NAME_EXTENSION
The extension for Ogg Vorbis files.static ContentType
OGG_VORBIS_CONTENT_TYPE
The content type for an Ogg Vorbis file:audio/ogg
.static java.lang.String
WAV_NAME_EXTENSION
The name extension for Microsoft Windows Wave format.
-
Constructor Summary
Constructors Constructor Description Audio()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isAudio(ContentType mediaType)
Determines if the given content type represents an audio file.
-
-
-
Field Detail
-
OGG_VORBIS_CONTENT_TYPE
public static final ContentType OGG_VORBIS_CONTENT_TYPE
The content type for an Ogg Vorbis file:audio/ogg
.- See Also:
- RFC 5334, MIME Types and File Extensions
-
MPEG_CONTENT_TYPE
public static final ContentType MPEG_CONTENT_TYPE
The content type for MP3:audio/mpeg
.
-
AU_NAME_EXTENSION
public static final java.lang.String AU_NAME_EXTENSION
The name extension for audio files.- See Also:
- Constant Field Values
-
MP3_NAME_EXTENSION
public static final java.lang.String MP3_NAME_EXTENSION
The extension for MPEG 2 layer 3 (MP3) files.- See Also:
- Constant Field Values
-
OGG_NAME_EXTENSION
public static final java.lang.String OGG_NAME_EXTENSION
The extension for Ogg Vorbis files.- See Also:
- Constant Field Values
-
WAV_NAME_EXTENSION
public static final java.lang.String WAV_NAME_EXTENSION
The name extension for Microsoft Windows Wave format.Codec-aware content types use the form
audio/vnd.wave; codec-YYYY
.
-
-
Method Detail
-
isAudio
public static boolean isAudio(ContentType mediaType)
Determines if the given content type represents an audio file.This method recognizes the following audio media types:
audio/*
application/ogg
- Parameters:
mediaType
- The content type to examine.- Returns:
true
if the content type represents audio.- See Also:
- RFC 5334, RFC 3534, MIME Types and File Extensions
-
-