com.evanmclean.evlib.io
Class MergedReader

java.lang.Object
  extended by java.io.Reader
      extended by com.evanmclean.evlib.io.MergedReader
All Implemented Interfaces:
Closeable, Readable

public class MergedReader
extends Reader

Read from a set of readers, as if they are all one big reader concatenated together.

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

Field Summary
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
MergedReader(Reader... readers)
           
 
Method Summary
 void close()
           
 int read()
           
 int read(char[] cbuf, int off, int len)
           
 boolean ready()
           
 
Methods inherited from class java.io.Reader
mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MergedReader

public MergedReader(Reader... readers)
Method Detail

close

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

read

public int read()
         throws IOException
Overrides:
read in class Reader
Throws:
IOException

read

public int read(char[] cbuf,
                int off,
                int len)
         throws IOException
Specified by:
read in class Reader
Throws:
IOException

ready

public boolean ready()
              throws IOException
Overrides:
ready in class Reader
Throws:
IOException