Class CompoundReader
java.lang.Object
java.io.Reader
com.twelvemonkeys.io.CompoundReader
- All Implemented Interfaces:
Closeable, AutoCloseable, Readable
A Reader implementation that can read from multiple sources.
- Version:
- $Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-core/src/main/java/com/twelvemonkeys/io/CompoundReader.java#2 $
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Reader
nullReader, of, read, read, readAllAsString, readAllLines, transferTo
-
Field Details
-
current
-
readers
-
finalLock
-
markSupported
protected final boolean markSupported -
currentReader
private int currentReader -
markedReader
private int markedReader -
mark
private long mark -
next
private long next
-
-
Constructor Details
-
CompoundReader
Create a new compound reader.- Parameters:
pReaders-IteratorcontaintingReaders, providing the character stream.- Throws:
NullPointerException- ifpReadersisnull, or any of the elements in the iterator isnull.ClassCastException- if any element of the iterator is not ajava.io.Reader
-
-
Method Details
-
nextReader
-
ensureOpen
Check to make sure that the stream has not been closed- Throws:
IOException- if the stream is closed
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classReader- Throws:
IOException
-
mark
- Overrides:
markin classReader- Throws:
IOException
-
reset
- Overrides:
resetin classReader- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classReader
-
read
- Overrides:
readin classReader- Throws:
IOException
-
read
- Specified by:
readin classReader- Throws:
IOException
-
ready
- Overrides:
readyin classReader- Throws:
IOException
-
skip
- Overrides:
skipin classReader- Throws:
IOException
-