|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.InputStream org.newdawn.slick.openal.OggInputStream
public class OggInputStream
An input stream that can extract ogg data. This class is a bit of an experiment with continuations so uses thread where possibly not required. It's just a test to see if continuations make sense in some cases.
Constructor Summary | |
---|---|
OggInputStream(java.io.InputStream input)
Create a new stream to decode OGG data |
Method Summary | |
---|---|
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 |
Methods inherited from class java.io.InputStream |
---|
mark, markSupported, reset, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OggInputStream(java.io.InputStream input) throws java.io.IOException
input
- The input stream from which to read the OGG file
java.io.IOException
- Indicates a failure to read from the supplied streamMethod Detail |
---|
public int getLength()
public int getChannels()
AudioInputStream.getChannels()
public int getRate()
AudioInputStream.getRate()
public int available()
available
in class java.io.InputStream
InputStream.available()
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()
AudioInputStream.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 read
java.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 into
java.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 class java.io.InputStream
java.io.IOException
- Indicates a failure to access the resourceInputStream.close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |