Package pi.resources.sound
Enum Class SoundFormat
- All Implemented Interfaces:
Serializable,Comparable<SoundFormat>,Constable
Enthält alle Audiodateiformate, die von der Engine unterstützt werden.
- Author:
- Steffen Wilke, Matthias Wilke
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic String[]Gibt alle unterstützten Dateiendungen als Feld/Array zurück.Gibt die kleingeschriebene Dateiendung mit Punkt aus (z.B.static SoundFormatGibt dasSoundFormatder angegebenen Dateierweiterung zurück.static booleanisSupported(File file) Prüft, ob die Dateiendung der angegebenen Datei von der Engine unterstützt wird.static booleanisSupported(String fileName) Prüft, ob die Dateiendung des angegebenen Dateinamens von der Engine unterstützt wird.static SoundFormatReturns the enum constant of this class with the specified name.static SoundFormat[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNSUPPORTED
-
OGG
-
MP3
-
WAV
-
-
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
-
get
Gibt dasSoundFormatder angegebenen Dateierweiterung zurück.- Parameters:
extension- Die Dateierweiterung, aus dem das Format ermittelt wird. Die Dateierweiterung kann einen führenden Punkt enthalten. Die Groß- und Kleinschreibung wird ignoriert.- Returns:
- Das Format des angegebenen Strings oder
UNSUPPORTED, wenn es nicht unterstützt wird.
-
isSupported
Prüft, ob die Dateiendung der angegebenen Datei von der Engine unterstützt wird.- Parameters:
file- Die zu prüfende Datei.- Returns:
true, wenn die Dateiendung in diesem Enum enthalten ist; andernfallsfalse.
-
isSupported
Prüft, ob die Dateiendung des angegebenen Dateinamens von der Engine unterstützt wird.- Parameters:
fileName- Der zu prüfende Dateiname.- Returns:
true, wenn die Dateiendung in diesem Enum enthalten ist; andernfallsfalse.
-
allExtensions
Gibt alle unterstützten Dateiendungen als Feld/Array zurück.- Returns:
- Ein Array aller unterstützten Dateiendungen.
-
fileExtension
Gibt die kleingeschriebene Dateiendung mit Punkt aus (z.B..ogg).- Returns:
- Die kleingeschriebene Dateiendung mit Punkt (z.B.
.ogg).
-