janino.net

org.codehaus.commons.io
Class MultiReader

java.lang.Object
  extended by java.io.Reader
      extended by org.codehaus.commons.io.MultiReader
All Implemented Interfaces:
Closeable, Readable

public class MultiReader
extends Reader

Similar to FilterReader, but when the first delegate is at end-of-input, it continues with reading from the next delegate.

This Reader does not support MARK.


Field Summary
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
MultiReader(List<Reader> delegates)
           
MultiReader(Reader[] delegates)
           
 
Method Summary
 void close()
          Closes all delegates.
 int read()
           
 int read(char[] cbuf, int off, int len)
           
 long skip(long n)
           
 
Methods inherited from class java.io.Reader
mark, markSupported, read, read, ready, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiReader

public MultiReader(List<Reader> delegates)

MultiReader

public MultiReader(Reader[] delegates)
Method Detail

close

public void close()
           throws IOException
Closes all delegates.

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

skip

public long skip(long n)
          throws IOException
Overrides:
skip 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

janino.net