Package org.jitsi.util
Class SoundFileUtils
- java.lang.Object
-
- org.jitsi.util.SoundFileUtils
-
public class SoundFileUtils extends Object
Defines the different permit extension file.- Author:
- Alexandre Maillard, Dmitri Melnikov, Vincent Lucas
-
-
Field Summary
Fields Modifier and Type Field Description static Stringaifstatic Stringaustatic StringDEFAULT_CALL_RECORDING_FORMATThe file extension and the format of call recording to be used by default.static Stringgsmstatic Stringmidstatic Stringmodstatic Stringmp2static Stringmp3static Stringoggstatic Stringramstatic StringwavDifferent extension of a sound filestatic Stringwma
-
Constructor Summary
Constructors Constructor Description SoundFileUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetExtension(File f)Gets the file extension.static booleanisSoundFile(File f)Checks whether this file is a sound file.static booleanisSoundFile(File f, String[] soundFormats)Checks whether this file is a sound file.
-
-
-
Field Detail
-
wav
public static final String wav
Different extension of a sound file- See Also:
- Constant Field Values
-
mid
public static final String mid
- See Also:
- Constant Field Values
-
mp2
public static final String mp2
- See Also:
- Constant Field Values
-
mp3
public static final String mp3
- See Also:
- Constant Field Values
-
mod
public static final String mod
- See Also:
- Constant Field Values
-
ram
public static final String ram
- See Also:
- Constant Field Values
-
wma
public static final String wma
- See Also:
- Constant Field Values
-
ogg
public static final String ogg
- See Also:
- Constant Field Values
-
gsm
public static final String gsm
- See Also:
- Constant Field Values
-
aif
public static final String aif
- See Also:
- Constant Field Values
-
au
public static final String au
- See Also:
- Constant Field Values
-
DEFAULT_CALL_RECORDING_FORMAT
public static final String DEFAULT_CALL_RECORDING_FORMAT
The file extension and the format of call recording to be used by default.- See Also:
- Constant Field Values
-
-
Method Detail
-
isSoundFile
public static boolean isSoundFile(File f)
Checks whether this file is a sound file.- Parameters:
f- File to check- Returns:
- true if it's a sound file, false otherwise
-
isSoundFile
public static boolean isSoundFile(File f, String[] soundFormats)
Checks whether this file is a sound file.- Parameters:
f- File to checksoundFormats- The sound formats to restrict the file name extension. If soundFormats is null, then every sound format defined by SoundFileUtils is correct.- Returns:
- true if it's a sound file conforming to the format given in parameters (if soundFormats is null, then every sound format defined by SoundFileUtils is correct), false otherwise.
-
-