sam.io
Class Mixer.InputStream
java.lang.Object
|
+--java.io.InputStream
|
+--sam.io.Mixer.InputStream
- Enclosing class:
- Mixer
- public class Mixer.InputStream
- extends java.io.InputStream
Inner-class for transparently unmixing an mixed stream
Field Summary |
protected long |
dataChunkLength
The number of plain bytes ready for reading |
Method Summary |
void |
close()
|
int |
read()
|
int |
read(byte[] data,
int begin,
int length)
Reads plain bytes of data. |
protected void |
unmix()
Unmixes the stream so that next bytes are plain data bytes. |
Methods inherited from class java.io.InputStream |
available, mark, markSupported, read, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dataChunkLength
protected long dataChunkLength
- The number of plain bytes ready for reading
Mixer.InputStream
public Mixer.InputStream(java.io.InputStream delegee)
read
public int read()
throws java.io.IOException
- Specified by:
read
in class java.io.InputStream
java.io.IOException
read
public int read(byte[] data,
int begin,
int length)
throws java.io.IOException
- Reads plain bytes of data.
Note that there might be less bytes actually read than requested.
- Overrides:
read
in class java.io.InputStream
- Parameters:
data
- byte[]
buffer to store read data intobegin
- offset of the buffer to start storing data atlength
- requested length of data to be read
java.io.IOException
close
public void close()
throws java.io.IOException
- Overrides:
close
in class java.io.InputStream
java.io.IOException
unmix
protected void unmix()
throws java.io.IOException
- Unmixes the stream so that next bytes are plain data bytes.
java.io.IOException