com.evanmclean.evlib.io
Class MergedInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by com.evanmclean.evlib.io.MergedInputStream
All Implemented Interfaces:
Closeable

public class MergedInputStream
extends InputStream

Read from a set of input streams, as if they are all one big input stream concatenated together.

Author:
Evan McLean McLean Computer Services (see the overview for copyright and licensing.)

Constructor Summary
MergedInputStream(InputStream... ins)
           
 
Method Summary
 int available()
           
 void close()
           
 int read()
           
 int read(byte[] buf, int off, int len)
           
 
Methods inherited from class java.io.InputStream
mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MergedInputStream

public MergedInputStream(InputStream... ins)
Method Detail

available

public int available()
              throws IOException
Overrides:
available in class InputStream
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class InputStream
Throws:
IOException

read

public int read()
         throws IOException
Specified by:
read in class InputStream
Throws:
IOException

read

public int read(byte[] buf,
                int off,
                int len)
         throws IOException
Overrides:
read in class InputStream
Throws:
IOException