org.tinyjee.maven.dim.utils
Class CompositeInputStream
java.lang.Object
java.io.InputStream
org.tinyjee.maven.dim.utils.CompositeInputStream
- All Implemented Interfaces:
- Closeable
public class CompositeInputStream
- extends InputStream
Composites a given number of input streams.
- Author:
- Juergen_Kellerer, 2011-10-27
Method Summary |
void |
close()
|
int |
read()
|
int |
read(byte[] buffer,
int off,
int len)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompositeInputStream
public CompositeInputStream(Collection<InputStream> streams)
- Constructs a new stream out of the given streams.
- Parameters:
streams
- the streams to composite.
CompositeInputStream
public CompositeInputStream(InputStream... streams)
- Constructs a new stream out of the given streams.
- Parameters:
streams
- the streams to composite.
read
public int read()
throws IOException
- Specified by:
read
in class InputStream
- Throws:
IOException
read
public int read(byte[] buffer,
int off,
int len)
throws IOException
- Overrides:
read
in class InputStream
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Overrides:
close
in class InputStream
- Throws:
IOException