Package org.codehaus.commons.io
Class MultiReader
- java.lang.Object
-
- java.io.Reader
-
- org.codehaus.commons.io.MultiReader
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Readable
public class MultiReader extends Reader
Similar toFilterReader, but when the first delegate is at end-of-input, it continues with reading from the next delegate.This
Readerdoes not support MARK.
-
-
Constructor Summary
Constructors Constructor Description MultiReader(Reader[] delegates)MultiReader(List<Reader> delegates)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes all delegates.intread()intread(char[] cbuf, int off, int len)longskip(long n)-
Methods inherited from class java.io.Reader
mark, markSupported, nullReader, read, read, ready, reset, transferTo
-
-
-
-
Method Detail
-
close
public void close() throws IOExceptionCloses all delegates.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classReader- Throws:
IOException
-
read
public int read() throws IOException- Overrides:
readin classReader- Throws:
IOException
-
skip
public long skip(long n) throws IOException- Overrides:
skipin classReader- Throws:
IOException
-
read
public int read(char[] cbuf, int off, int len) throws IOException- Specified by:
readin classReader- Throws:
IOException
-
-