Enum Class FileFormat
- All Implemented Interfaces:
Serializable
,Comparable<FileFormat>
,Constable
Represents a file format for audio files.
- Since:
- 1.0.0
- Version:
- 2.0.0
- Author:
- Ralph Niemitz/RalleYTN(ralph.niemitz@gmx.de)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAudio Interchange File Format(.aifc)
WARNING: The format is not supported on all systems!Audio Interchange File Format(.aiff)Au Sound File(.au)MPEG-1 Audio Layer III or MPEG-2 Audio Layer III(.mp3)Ogg Vorbis(.ogg, .oga)Audio Interchange File Format(.snd)
WARNING: The format is not supported on all systems!Wavesound(.wav) -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
FileFormat
(boolean writingSupported, AudioFileFormat.Type type, String... associatedFileExtensions) -
Method Summary
Modifier and TypeMethodDescriptionstatic FileFormat
getFormatByName
(String name) getType()
boolean
static FileFormat
Returns the enum constant of this class with the specified name.static FileFormat[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
WAV
Wavesound(.wav)- Since:
- 1.0.0
-
MP3
MPEG-1 Audio Layer III or MPEG-2 Audio Layer III(.mp3)- Since:
- 1.0.0
-
OGG
Ogg Vorbis(.ogg, .oga)- Since:
- 1.0.0
-
FLAC
-
AIFF
Audio Interchange File Format(.aiff)- Since:
- 1.0.0
-
AU
Au Sound File(.au)- Since:
- 1.0.0
-
AIFC
Audio Interchange File Format(.aifc)
WARNING: The format is not supported on all systems!- Since:
- 1.1.0
-
SND
Audio Interchange File Format(.snd)
WARNING: The format is not supported on all systems!- Since:
- 1.1.0
-
-
Field Details
-
associatedFileExtensions
-
writingSupported
private final boolean writingSupported -
type
-
-
Constructor Details
-
FileFormat
private FileFormat(boolean writingSupported, AudioFileFormat.Type type, String... associatedFileExtensions)
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getFormatByName
- Parameters:
name
- name of the file- Returns:
- the FileFormat instance which fits or
null
if no file format could be found for that name. - Since:
- 1.0.0
-
getType
- Returns:
- the AudioFileFormat.Type equivalent to this FileFormat instance
- Since:
- 1.1.0
-
isWritingSupported
public boolean isWritingSupported()- Returns:
true
if writing for the file format is supported, elsefalse
- Since:
- 1.0.0
-
getAssociatedExtensions
- Returns:
- a list with all associated file extensions
- Since:
- 1.0.0
-