public class JoinedInputStream
extends java.io.InputStream
InputStream
's into one.
Reading from an instance of JoinedInputStream
will
read each underlying InputStream
until it is
depleted and then continue with the next one.
Depleted InputStream
's will be closed as soon
as possible.
Constructor and Description |
---|
JoinedInputStream() |
Modifier and Type | Method and Description |
---|---|
JoinedInputStream |
add(java.io.InputStream in)
Add another
InputStream . |
void |
close() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
public JoinedInputStream add(java.io.InputStream in)
InputStream
.
It is allowed to add more InputStream
's
even after reading has started.
It is illegal to add more streams after the joined stream has been closed.
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
java.io.IOException
Copyright © 2008-2013. All Rights Reserved.