Package com.google.common.io
Class MultiInputStream
java.lang.Object
java.io.InputStream
com.google.common.io.MultiInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
An
InputStream
that concatenates multiple substreams. At most one stream will be open at
a time.- Since:
- 1.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.InputStream
mark, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skipNBytes, transferTo
-
Field Details
-
it
-
in
-
-
Constructor Details
-
MultiInputStream
Creates a new instance.- Parameters:
it
- an iterator of I/O suppliers that will provide each substream- Throws:
IOException
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
advance
Closes the current input stream and opens the next one, if any.- Throws:
IOException
-
available
- Overrides:
available
in classInputStream
- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupported
in classInputStream
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
skip
- Overrides:
skip
in classInputStream
- Throws:
IOException
-