public class SpeexAudioFileReader
extends javax.sound.sampled.spi.AudioFileReader
| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
SpeexAudioFileReader() |
| Modifier and Type | Method and Description |
|---|---|
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).
|
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
public javax.sound.sampled.AudioFileFormat getAudioFileFormat(java.io.File file)
throws javax.sound.sampled.UnsupportedAudioFileException,
java.io.IOException
getAudioFileFormat in class javax.sound.sampled.spi.AudioFileReaderfile - 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
getAudioFileFormat in class javax.sound.sampled.spi.AudioFileReaderurl - 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
getAudioFileFormat in class javax.sound.sampled.spi.AudioFileReaderstream - 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
getAudioInputStream in class javax.sound.sampled.spi.AudioFileReaderfile - 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
getAudioInputStream in class javax.sound.sampled.spi.AudioFileReaderurl - 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
getAudioInputStream in class javax.sound.sampled.spi.AudioFileReaderstream - 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.Copyright © 1999-2004 Wimba S.A. All Rights Reserved.