public class InputStreamCombiner extends InputStream
Modifier and Type | Field and Description |
---|---|
private InputStream[] |
in |
private int |
index |
Constructor and Description |
---|
InputStreamCombiner(InputStream... in)
Create a new stream combiner using the given streams to read from
|
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close()
Closes all underlying streams.
|
private void |
nextStream() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
long |
skip(long n) |
mark, markSupported, reset
private final InputStream[] in
private int index
public InputStreamCombiner(InputStream... in)
in
- The stream to read from, must be an array with at least
one streampublic int available() throws IOException
available
in class InputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class InputStream
IOException
public int read(byte[] b) throws IOException
read
in class InputStream
IOException
public long skip(long n) throws IOException
skip
in class InputStream
IOException
public int read() throws IOException
read
in class InputStream
IOException
private void nextStream()