public class SequenceReader
extends java.io.Reader
Reader
s in sequence.
Like SequenceInputStream
but for Reader
arguments.
Modifier and Type | Field and Description |
---|---|
private java.io.Reader |
reader |
private java.util.Iterator<? extends java.io.Reader> |
readers |
Constructor and Description |
---|
SequenceReader(java.lang.Iterable<? extends java.io.Reader> readers)
Constructs a new instance with readers
|
SequenceReader(java.io.Reader... readers)
Constructs a new instance with readers
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
private java.io.Reader |
nextReader()
Returns the next available reader or null if done.
|
int |
read() |
int |
read(char[] cbuf,
int off,
int len) |
private java.io.Reader reader
private final java.util.Iterator<? extends java.io.Reader> readers
public SequenceReader(java.lang.Iterable<? extends java.io.Reader> readers)
readers
- the readers to readpublic SequenceReader(java.io.Reader... readers)
readers
- the readers to readpublic void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.Reader
java.io.IOException
private java.io.Reader nextReader() throws java.io.IOException
java.io.IOException
- IOException If an I/O error occurs.public int read() throws java.io.IOException
read
in class java.io.Reader
java.io.IOException
public int read(char[] cbuf, int off, int len) throws java.io.IOException
read
in class java.io.Reader
java.io.IOException