public class CompoundReader extends Reader
Modifier and Type | Field and Description |
---|---|
protected Object |
finalLock |
protected boolean |
markSupported |
Constructor and Description |
---|
CompoundReader(Iterator<Reader> pReaders)
Create a new compound reader.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected void |
ensureOpen()
Check to make sure that the stream has not been closed
|
void |
mark(int pReadLimit) |
boolean |
markSupported() |
protected Reader |
nextReader() |
int |
read() |
int |
read(char[] pBuffer,
int pOffset,
int pLength) |
boolean |
ready() |
void |
reset() |
long |
skip(long pChars) |
protected final Object finalLock
protected final boolean markSupported
public CompoundReader(Iterator<Reader> pReaders)
pReaders
- Iterator
containting Reader
s,
providing the character stream.NullPointerException
- if pReaders
is null
, or
any of the elements in the iterator is null
.ClassCastException
- if any element of the iterator is not a
java.io.Reader
protected final Reader nextReader()
protected final void ensureOpen() throws IOException
IOException
- if the stream is closedpublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class Reader
IOException
public void mark(int pReadLimit) throws IOException
mark
in class Reader
IOException
public void reset() throws IOException
reset
in class Reader
IOException
public boolean markSupported()
markSupported
in class Reader
public int read() throws IOException
read
in class Reader
IOException
public int read(char[] pBuffer, int pOffset, int pLength) throws IOException
read
in class Reader
IOException
public boolean ready() throws IOException
ready
in class Reader
IOException
public long skip(long pChars) throws IOException
skip
in class Reader
IOException
Copyright © 2017. All rights reserved.