public class OggInputStream
extends java.io.InputStream
Constructor and Description |
---|
OggInputStream(java.io.InputStream input)
Create a new stream to decode OGG data
|
Modifier and Type | Method and Description |
---|---|
boolean |
atEnd()
Check if the stream is at the end, i.e.
|
int |
available() |
void |
close()
Close the stream
|
int |
getChannels()
Get the number of channels used by the audio
|
int |
getLength()
Get the number of bytes on the stream
|
int |
getRate()
The play back rate described in the underling audio file
|
int |
read()
Read a single byte from the stream
|
int |
read(byte[] b)
Read up to data.length bytes from the stream
|
int |
read(byte[] b,
int off,
int len)
Read up to len bytes from the stream
|
public OggInputStream(java.io.InputStream input) throws java.io.IOException
input
- The input stream from which to read the OGG filejava.io.IOException
- Indicates a failure to read from the supplied streampublic int getLength()
public int getChannels()
public int getRate()
public int available()
available
in class java.io.InputStream
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
- Indicates a failure to read the underlying mediaInputStream.read()
public boolean atEnd()
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
b
- The array to read intooff
- The offset into the array at which to start writinglen
- The maximum number of bytes to readjava.io.IOException
- Indicates a failure to read the underlying mediaInputStream.read(byte[], int, int)
public int read(byte[] b) throws java.io.IOException
read
in class java.io.InputStream
b
- The array to read intojava.io.IOException
- Indicates a failure to read the underlying mediaInputStream.read(byte[])
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
java.io.IOException
- Indicates a failure to access the resourceInputStream.close()