InputStream wrapper that reads from a queue of underlying InputStreams, giving the impression that all data is coming from a single,
continuous, source.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private Queue |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected boolean | addInputStream(InputStream
the newIn)InputStream to add.Adds another |
| public int | Returns: the number of bytes available.Overrides java. Returns the number of bytes available in the active underlying |
| public void | close()
Overrides java. Implements java. Closes this stream and all underlying |
| private void | |
| private boolean | nextInLine()
Closes the currently active |
| public int | |
| public int | read(byte[]
the buffer into which the data is read. b)Overrides java. Forwards the read to |
| public int | read(byte[]
the buffer into which the data is read. b, int the start offset in array off, int b
at which the data is written.the maximum number of bytes to read. len)Overrides java. Reads bytes from the underlying |
| closed | back to summary |
|---|---|
| private boolean closed | |
| inputStreams | back to summary |
|---|---|
| private Queue<InputStream> inputStreams | |
| ContinuousInputStream | back to summary |
|---|---|
| protected ContinuousInputStream(InputStream in) | |
| addInputStream | back to summary |
|---|---|
| protected boolean addInputStream(InputStream newIn) Adds another
| |
| available | back to summary |
|---|---|
| public int available() throws IOException Overrides java. Returns the number of bytes available in the active underlying
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Closes this stream and all underlying
| |
| ensureOpen | back to summary |
|---|---|
| private void ensureOpen() throws IOException Ensures that this
| |
| nextInLine | back to summary |
|---|---|
| private boolean nextInLine() throws IOException Closes the currently active
| |
| read | back to summary |
|---|---|
| public int read() throws IOException Overrides java. Reads one byte from the underlying
| |
| read | back to summary |
|---|---|
| public int read(byte[] b) throws IOException Overrides java. Forwards the read to
| |
| read | back to summary |
|---|---|
| public int read(byte[] b, int off, int len) throws IOException Overrides java. Reads bytes from the underlying
| |