com.twelvemonkeys.io
Class CompoundReader
java.lang.Object
java.io.Reader
com.twelvemonkeys.io.CompoundReader
- All Implemented Interfaces:
- Closeable, Readable
public class CompoundReader
- extends Reader
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 $
- Author:
- Harald Kuhr, last modified by $Author: haku $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
finalLock
protected final Object finalLock
markSupported
protected final boolean markSupported
CompoundReader
public CompoundReader(Iterator<Reader> pReaders)
- Create a new compound reader.
- Parameters:
pReaders - Iterator containting Readers,
providing the character stream.
- Throws:
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
nextReader
protected final Reader nextReader()
ensureOpen
protected final void ensureOpen()
throws IOException
- Check to make sure that the stream has not been closed
- Throws:
IOException - if the stream is closed
close
public void close()
throws IOException
- Specified by:
close in interface Closeable- Specified by:
close in class Reader
- Throws:
IOException
mark
public void mark(int pReadLimit)
throws IOException
- Overrides:
mark in class Reader
- Throws:
IOException
reset
public void reset()
throws IOException
- Overrides:
reset in class Reader
- Throws:
IOException
markSupported
public boolean markSupported()
- Overrides:
markSupported in class Reader
read
public int read()
throws IOException
- Overrides:
read in class Reader
- Throws:
IOException
read
public int read(char[] pBuffer,
int pOffset,
int pLength)
throws IOException
- Specified by:
read in class Reader
- Throws:
IOException
ready
public boolean ready()
throws IOException
- Overrides:
ready in class Reader
- Throws:
IOException
skip
public long skip(long pChars)
throws IOException
- Overrides:
skip in class Reader
- Throws:
IOException
Copyright © 2015. All Rights Reserved.