Package com.twelvemonkeys.io
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 java.io.Reader
nullReader, read, read, 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
-Iterator
containtingReader
s, providing the character stream.- Throws:
NullPointerException
- ifpReaders
isnull
, 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classReader
- Throws:
IOException
-
mark
- Overrides:
mark
in classReader
- Throws:
IOException
-
reset
- Overrides:
reset
in classReader
- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupported
in classReader
-
read
- Overrides:
read
in classReader
- Throws:
IOException
-
read
- Specified by:
read
in classReader
- Throws:
IOException
-
ready
- Overrides:
ready
in classReader
- Throws:
IOException
-
skip
- Overrides:
skip
in classReader
- Throws:
IOException
-