final class MultiInputStream
extends java.io.InputStream
InputStream that concatenates multiple substreams. At most one stream will be open at
a time.| Modifier and Type | Field and Description |
|---|---|
private java.io.InputStream |
in |
private java.util.Iterator<? extends ByteSource> |
it |
| Constructor and Description |
|---|
MultiInputStream(java.util.Iterator<? extends ByteSource> it)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
advance()
Closes the current input stream and opens the next one, if any.
|
int |
available() |
void |
close() |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
long |
skip(long n) |
private java.util.Iterator<? extends ByteSource> it
@CheckForNull private java.io.InputStream in
public MultiInputStream(java.util.Iterator<? extends ByteSource> it) throws java.io.IOException
it - an iterator of I/O suppliers that will provide each substreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOExceptionprivate void advance()
throws java.io.IOException
java.io.IOExceptionpublic int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOExceptionpublic boolean markSupported()
markSupported in class java.io.InputStreampublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic long skip(long n)
throws java.io.IOException
skip in class java.io.InputStreamjava.io.IOException