|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.sound.sampled.spi.AudioFileReader org.xiph.speex.spi.SpeexAudioFileReader
Provider for Speex audio file reading services. This implementation can parse the format information from Speex audio file, and can produce audio input streams from files of this type.
Field Summary | |
static int |
OGG_HEADERSIZE
|
static java.lang.String |
OGGID
The String that identifies the beginning of an Ogg packet. |
static int |
SEGOFFSET
|
static int |
SPEEX_HEADERSIZE
The size of the Speex header. |
static java.lang.String |
SPEEXID
The String that identifies the beginning of the Speex header. |
Constructor Summary | |
SpeexAudioFileReader()
|
Method Summary | |
javax.sound.sampled.AudioFileFormat |
getAudioFileFormat(java.io.File file)
Obtains the audio file format of the File provided. |
javax.sound.sampled.AudioFileFormat |
getAudioFileFormat(java.io.InputStream stream)
Obtains an audio input stream from the input stream provided. |
protected javax.sound.sampled.AudioFileFormat |
getAudioFileFormat(java.io.InputStream bitStream,
java.io.ByteArrayOutputStream baos,
int mediaLength)
Return the AudioFileFormat from the given InputStream. |
protected javax.sound.sampled.AudioFileFormat |
getAudioFileFormat(java.io.InputStream stream,
int medialength)
Return the AudioFileFormat from the given InputStream. |
javax.sound.sampled.AudioFileFormat |
getAudioFileFormat(java.net.URL url)
Obtains an audio input stream from the URL provided. |
javax.sound.sampled.AudioInputStream |
getAudioInputStream(java.io.File file)
Obtains an audio input stream from the File provided. |
javax.sound.sampled.AudioInputStream |
getAudioInputStream(java.io.InputStream stream)
Obtains an audio input stream from the input stream provided. |
protected javax.sound.sampled.AudioInputStream |
getAudioInputStream(java.io.InputStream inputStream,
int medialength)
Obtains an audio input stream from the input stream provided. |
javax.sound.sampled.AudioInputStream |
getAudioInputStream(java.net.URL url)
Obtains an audio input stream from the URL provided. |
private static int |
readInt(byte[] data,
int offset)
Converts Little Endian (Windows) bytes to an int (Java uses Big Endian). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int OGG_HEADERSIZE
public static final int SPEEX_HEADERSIZE
public static final int SEGOFFSET
public static final java.lang.String OGGID
public static final java.lang.String SPEEXID
Constructor Detail |
public SpeexAudioFileReader()
Method Detail |
public javax.sound.sampled.AudioFileFormat getAudioFileFormat(java.io.File file) throws javax.sound.sampled.UnsupportedAudioFileException, java.io.IOException
file
- the File from which file format information should be
extracted.
javax.sound.sampled.UnsupportedAudioFileException
- if the File does not point to
a valid audio file data recognized by the system.
java.io.IOException
- if an I/O exception occurs.public javax.sound.sampled.AudioFileFormat getAudioFileFormat(java.net.URL url) throws javax.sound.sampled.UnsupportedAudioFileException, java.io.IOException
url
- the URL for which the AudioInputStream should be constructed.
javax.sound.sampled.UnsupportedAudioFileException
- if the File does not point to
a valid audio file data recognized by the system.
java.io.IOException
- if an I/O exception occurs.public javax.sound.sampled.AudioFileFormat getAudioFileFormat(java.io.InputStream stream) throws javax.sound.sampled.UnsupportedAudioFileException, java.io.IOException
stream
- the input stream from which the AudioInputStream should be
constructed.
javax.sound.sampled.UnsupportedAudioFileException
- if the File does not point to
a valid audio file data recognized by the system.
java.io.IOException
- if an I/O exception occurs.protected javax.sound.sampled.AudioFileFormat getAudioFileFormat(java.io.InputStream stream, int medialength) throws javax.sound.sampled.UnsupportedAudioFileException, java.io.IOException
stream
- the input stream from which the AudioInputStream should be
constructed.medialength
-
javax.sound.sampled.UnsupportedAudioFileException
- if the File does not point to
a valid audio file data recognized by the system.
java.io.IOException
- if an I/O exception occurs.protected javax.sound.sampled.AudioFileFormat getAudioFileFormat(java.io.InputStream bitStream, java.io.ByteArrayOutputStream baos, int mediaLength) throws javax.sound.sampled.UnsupportedAudioFileException, java.io.IOException
bitStream
- baos
- mediaLength
-
javax.sound.sampled.UnsupportedAudioFileException
- if the File does not point to
a valid audio file data recognized by the system.
java.io.IOException
- if an I/O exception occurs.public javax.sound.sampled.AudioInputStream getAudioInputStream(java.io.File file) throws javax.sound.sampled.UnsupportedAudioFileException, java.io.IOException
file
- the File for which the AudioInputStream should be constructed.
javax.sound.sampled.UnsupportedAudioFileException
- if the File does not point to
a valid audio file data recognized by the system.
java.io.IOException
- if an I/O exception occurs.public javax.sound.sampled.AudioInputStream getAudioInputStream(java.net.URL url) throws javax.sound.sampled.UnsupportedAudioFileException, java.io.IOException
url
- the URL for which the AudioInputStream should be constructed.
javax.sound.sampled.UnsupportedAudioFileException
- if the File does not point to
a valid audio file data recognized by the system.
java.io.IOException
- if an I/O exception occurs.public javax.sound.sampled.AudioInputStream getAudioInputStream(java.io.InputStream stream) throws javax.sound.sampled.UnsupportedAudioFileException, java.io.IOException
stream
- the input stream from which the AudioInputStream should be
constructed.
javax.sound.sampled.UnsupportedAudioFileException
- if the File does not point to
a valid audio file data recognized by the system.
java.io.IOException
- if an I/O exception occurs.protected javax.sound.sampled.AudioInputStream getAudioInputStream(java.io.InputStream inputStream, int medialength) throws javax.sound.sampled.UnsupportedAudioFileException, java.io.IOException
inputStream
- the input stream from which the AudioInputStream should
be constructed.medialength
-
javax.sound.sampled.UnsupportedAudioFileException
- if the File does not point to
a valid audio file data recognized by the system.
java.io.IOException
- if an I/O exception occurs.private static int readInt(byte[] data, int offset)
data
- the data to read.offset
- the offset from which to start reading.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |