public enum SoundFormat extends java.lang.Enum<SoundFormat>
ImageFormat
Enum Constant and Description |
---|
MP3 |
OGG |
UNSUPPORTED |
WAV |
Modifier and Type | Method and Description |
---|---|
static SoundFormat |
get(java.lang.String format)
Gets the
SoundFormat of the specified format string. |
static java.lang.String[] |
getAllExtensions() |
static boolean |
isSupported(java.io.File file)
Determines whether the extension of the specified file is supported by the engine.
|
static boolean |
isSupported(java.lang.String fileName)
Determines whether the extension of the specified file is supported by the engine.
|
java.lang.String |
toFileExtension()
Converts this format instance to a file format string that can be used as an extension (e.g.
|
java.lang.String |
toString() |
static SoundFormat |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static SoundFormat[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SoundFormat UNSUPPORTED
public static final SoundFormat OGG
public static final SoundFormat MP3
public static final SoundFormat WAV
public static SoundFormat[] values()
for (SoundFormat c : SoundFormat.values()) System.out.println(c);
public static SoundFormat valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static SoundFormat get(java.lang.String format)
SoundFormat
of the specified format string.format
- The format string from which to extract the format.UNDEFINED
if not supported.public static boolean isSupported(java.io.File file)
file
- The file to check for.public static boolean isSupported(java.lang.String fileName)
fileName
- The file name to check for.public static java.lang.String[] getAllExtensions()
public java.lang.String toFileExtension()
public java.lang.String toString()
toString
in class java.lang.Enum<SoundFormat>