|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.InputStream com.ados.hestia.utils.io.JoinInputStream
public class JoinInputStream
Stream, wich combines many other input sources.
This takes array of other streams and virtually
creates single stream which transitively reads
data from initial array of streams.
Field Summary | |
---|---|
protected byte[] |
m_buffer
|
protected int |
m_currentStream
|
protected int |
m_filllen
|
protected ArrayList<InputStream> |
m_list
|
protected int |
m_readpos
|
Constructor Summary | |
---|---|
JoinInputStream(InputStream[] streams)
Construct. |
Method Summary | |
---|---|
int |
available()
|
protected int |
availableInternal()
Returns number of bytes available at internal buffer. |
void |
close()
|
protected void |
fill()
Fill Internal buffer from streams. |
int |
read()
|
Methods inherited from class java.io.InputStream |
---|
mark, markSupported, read, read, reset, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ArrayList<InputStream> m_list
protected byte[] m_buffer
protected int m_readpos
protected int m_filllen
protected int m_currentStream
Constructor Detail |
---|
public JoinInputStream(InputStream[] streams) throws IOException
streams
- array of underlayed streams to compose virtual stream.
IOException
- if no one underlayed stream is present.Method Detail |
---|
public int read() throws IOException
read
in class InputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in class InputStream
IOException
public int available() throws IOException
available
in class InputStream
IOException
protected int availableInternal()
protected void fill() throws IOException
IOException
- if one of stream cannot be read.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |