com.jmex.audio.stream
Class WavInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
com.jmex.audio.stream.AudioInputStream
com.jmex.audio.stream.WavInputStream
- All Implemented Interfaces:
- java.io.Closeable
public class WavInputStream
- extends AudioInputStream
| Fields inherited from class java.io.FilterInputStream |
in |
| Methods inherited from class java.io.FilterInputStream |
available, close, mark, markSupported, read, read, read, reset, skip |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WavInputStream
public WavInputStream(java.net.URL resource)
throws java.io.IOException
- Throws:
java.io.IOException
read
public int read(java.nio.ByteBuffer b,
int off,
int len)
throws java.io.IOException
- Reads up to len bytes of data from the input stream into a ByteBuffer.
- Specified by:
read in class AudioInputStream
- Parameters:
b - the buffer into which the data is read.off - the start offset of the data.len - the maximum number of bytes read.
- Returns:
- the total number of bytes read into the buffer, or -1 if there is
no more data because the end of the stream has been reached.
- Throws:
java.io.IOException
getChannelCount
public int getChannelCount()
- Specified by:
getChannelCount in class AudioInputStream
- Returns:
- number of channels in this stream
getDepth
public int getDepth()
- Specified by:
getDepth in class AudioInputStream
- Returns:
- the bit depth of this stream
getBitRate
public int getBitRate()
- Specified by:
getBitRate in class AudioInputStream
- Returns:
- the bitrate of this stream
marksupported
public boolean marksupported()
readSample
public void readSample(byte[] b,
int start,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
readSample
public void readSample(short[] b,
int start,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
readSample
public void readSample(int[] b,
int start,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
makeNew
public WavInputStream makeNew()
throws java.io.IOException
- Specified by:
makeNew in class AudioInputStream
- Throws:
java.io.IOException