org.codehaus.commons.io
Class MultiReader
java.lang.Object
java.io.Reader
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.
|
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.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultiReader
public MultiReader(List<Reader> delegates)
MultiReader
public MultiReader(Reader[] delegates)
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