Package org.apache.commons.io.input
Class SequenceReader
- java.lang.Object
-
- java.io.Reader
-
- org.apache.commons.io.input.SequenceReader
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Readable
public class SequenceReader extends Reader
Provides the contents of multiple Readers in sequence.- Since:
- 2.7
-
-
Constructor Summary
Constructors Constructor Description SequenceReader(Reader... readers)Construct a new instance with readersSequenceReader(Iterable<? extends Reader> readers)Construct a new instance with readers
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()intread()intread(char[] cbuf, int off, int len)-
Methods inherited from class java.io.Reader
mark, markSupported, nullReader, read, read, ready, reset, skip, transferTo
-
-
-
-
Constructor Detail
-
SequenceReader
public SequenceReader(Iterable<? extends Reader> readers)
Construct a new instance with readers- Parameters:
readers- the readers to read
-
SequenceReader
public SequenceReader(Reader... readers)
Construct a new instance with readers- Parameters:
readers- the readers to read
-
-
Method Detail
-
close
public void close() throws IOException- 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
-
read
public int read(char[] cbuf, int off, int len) throws IOException- Specified by:
readin classReader- Throws:
IOException
-
-