org.tritonus.sampled.file
Class WaveAudioFileReader
java.lang.Object
javax.sound.sampled.spi.AudioFileReader
org.tritonus.share.sampled.file.TAudioFileReader
org.tritonus.sampled.file.WaveAudioFileReader
- public class WaveAudioFileReader
- extends TAudioFileReader
Class for reading wave files.
- Author:
- Florian Bomers, Matthias Pfisterer
Methods inherited from class org.tritonus.share.sampled.file.TAudioFileReader |
calculateFrameSize, getAudioFileFormat, getAudioFileFormat, getAudioFileFormat, getAudioInputStream, getAudioInputStream, getAudioInputStream, getAudioInputStream, readIeeeExtended, readLittleEndianInt, readLittleEndianShort |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WaveAudioFileReader
public WaveAudioFileReader()
advanceChunk
protected void advanceChunk(DataInputStream dis,
long prevLength,
long prevRead)
throws IOException
- Throws:
IOException
findChunk
protected long findChunk(DataInputStream dis,
int key)
throws UnsupportedAudioFileException,
IOException
- Throws:
UnsupportedAudioFileException
IOException
readFormatChunk
protected AudioFormat readFormatChunk(DataInputStream dis,
long chunkLength)
throws UnsupportedAudioFileException,
IOException
- Throws:
UnsupportedAudioFileException
IOException
getAudioFileFormat
protected AudioFileFormat getAudioFileFormat(InputStream inputStream,
long lFileLengthInBytes)
throws UnsupportedAudioFileException,
IOException
- Description copied from class:
TAudioFileReader
- Get an AudioFileFormat (internal implementation).
Subclasses must implement this method in a way specific
to the file format they handle.
Note that depending on the implementation of this method,
you should or should not override
getAudioInputStream(InputStream, long), too (see comment
there).
- Specified by:
getAudioFileFormat
in class TAudioFileReader
- Parameters:
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.
- Returns:
- an AudioFileFormat instance containing
information from the header of the stream passed in as
inputStream.
- Throws:
UnsupportedAudioFileException
IOException