|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.sound.sampled.spi.AudioFileReader
org.tritonus.share.sampled.file.TAudioFileReader
Base class for audio file readers. This is Tritonus' base class for classes that provide the facility of detecting an audio file type and reading its header. Classes should be derived from this class or one of its subclasses rather than from javax.sound.sampled.spi.AudioFileReader.
Constructor Summary | |
---|---|
protected |
TAudioFileReader(int nMarkLimit)
|
protected |
TAudioFileReader(int nMarkLimit,
boolean bRereading)
|
Method Summary | |
---|---|
protected static int |
calculateFrameSize(int nSampleSize,
int nNumChannels)
|
AudioFileFormat |
getAudioFileFormat(File file)
Get an AudioFileFormat object for a File. |
AudioFileFormat |
getAudioFileFormat(InputStream inputStream)
Get an AudioFileFormat object for an InputStream. |
protected abstract AudioFileFormat |
getAudioFileFormat(InputStream inputStream,
long lFileLengthInBytes)
Get an AudioFileFormat (internal implementation). |
AudioFileFormat |
getAudioFileFormat(URL url)
Get an AudioFileFormat object for a URL. |
AudioInputStream |
getAudioInputStream(File file)
Get an AudioInputStream object for a file. |
AudioInputStream |
getAudioInputStream(InputStream inputStream)
Get an AudioInputStream object for an InputStream. |
protected AudioInputStream |
getAudioInputStream(InputStream inputStream,
long lFileLengthInBytes)
Get an AudioInputStream (internal implementation). |
AudioInputStream |
getAudioInputStream(URL url)
Get an AudioInputStream object for a URL. |
static double |
readIeeeExtended(DataInputStream dis)
|
static int |
readLittleEndianInt(InputStream is)
|
static short |
readLittleEndianShort(InputStream is)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected TAudioFileReader(int nMarkLimit)
protected TAudioFileReader(int nMarkLimit, boolean bRereading)
Method Detail |
---|
public AudioFileFormat getAudioFileFormat(File file) throws UnsupportedAudioFileException, IOException
getAudioFileFormat
in class AudioFileReader
file
- the file to read from.
UnsupportedAudioFileException
IOException
public AudioFileFormat getAudioFileFormat(URL url) throws UnsupportedAudioFileException, IOException
getAudioFileFormat
in class AudioFileReader
url
- the URL to read from.
UnsupportedAudioFileException
IOException
public AudioFileFormat getAudioFileFormat(InputStream inputStream) throws UnsupportedAudioFileException, IOException
getAudioFileFormat
in class AudioFileReader
inputStream
- the stream to read from.
UnsupportedAudioFileException
IOException
protected abstract AudioFileFormat getAudioFileFormat(InputStream inputStream, long lFileLengthInBytes) throws UnsupportedAudioFileException, IOException
inputStream
- The InputStream to read from.lFileLengthInBytes
- The size of the originating
file, if known. If it isn't known, AudioSystem.NOT_SPECIFIED
should be passed. This value may be used for byteLength in
AudioFileFormat, if this value can't be derived from the
informmation in the file header.
UnsupportedAudioFileException
IOException
public AudioInputStream getAudioInputStream(File file) throws UnsupportedAudioFileException, IOException
getAudioInputStream
in class AudioFileReader
file
- the File object to read from.
UnsupportedAudioFileException
IOException
public AudioInputStream getAudioInputStream(URL url) throws UnsupportedAudioFileException, IOException
getAudioInputStream
in class AudioFileReader
url
- the URL to read from.
UnsupportedAudioFileException
IOException
public AudioInputStream getAudioInputStream(InputStream inputStream) throws UnsupportedAudioFileException, IOException
getAudioInputStream
in class AudioFileReader
inputStream
- the stream to read from.
UnsupportedAudioFileException
IOException
protected AudioInputStream getAudioInputStream(InputStream inputStream, long lFileLengthInBytes) throws UnsupportedAudioFileException, IOException
inputStream
- The InputStream to read from.lFileLengthInBytes
- The size of the originating
file, if known. If it isn't known, AudioSystem.NOT_SPECIFIED
should be passed. This value may be used for byteLength in
AudioFileFormat, if this value can't be derived from the
informmation in the file header.
UnsupportedAudioFileException
IOException
protected static int calculateFrameSize(int nSampleSize, int nNumChannels)
public static int readLittleEndianInt(InputStream is) throws IOException
IOException
public static short readLittleEndianShort(InputStream is) throws IOException
IOException
public static double readIeeeExtended(DataInputStream dis) throws IOException
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |