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