|
Bali Share 1.1.18 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.Reader | +--oracle.bali.share.io.CompositeReader
The CompositeReader class allows an application to combine several Readers serially and make them appear as if they were a single Reader. Each Reader is read from, in turn, until it reaches the end of it's data stream. The CompositeReader class then automatically continues reading from the next Reader.
Fields inherited from class java.io.Reader |
lock |
Constructor Summary | |
CompositeReader()
Creates a new CompositeReader. |
|
CompositeReader(java.io.Reader aReader)
Creates a CompositeReader and makes the given reader the first reader in the sequence. |
Method Summary | |
void |
appendReader(java.io.Reader aReader)
Adds a new Reader to the CompositeReader sequence. |
void |
close()
Close the stream. |
int |
read()
Read a single character. |
int |
read(char[] cbuf)
Read characters into an array. |
int |
read(char[] cbuf,
int off,
int len)
Read characters into a portion of an array. |
boolean |
ready()
Tell whether this stream is ready to be read. |
void |
removeAllReaders()
Removes all of the Readers that this CompositeReader contains. |
void |
reset()
Reset the composite stream to the beginning. |
long |
skip(long n)
Skip characters. |
Methods inherited from class java.io.Reader |
mark, markSupported |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CompositeReader()
aReader
- the first reader in the sequencepublic CompositeReader(java.io.Reader aReader)
aReader
- the first reader in the sequenceMethod Detail |
public void appendReader(java.io.Reader aReader)
aReader
- the reader to addpublic boolean ready() throws java.io.IOException
ready
in class java.io.Reader
java.io.IOException
- If an I/O error occurspublic void removeAllReaders()
public int read() throws java.io.IOException
read
in class java.io.Reader
java.io.IOException
- If an I/O error occurspublic int read(char[] cbuf) throws java.io.IOException
read
in class java.io.Reader
cbuf
- Destination bufferjava.io.IOException
- If an I/O error occurspublic int read(char[] cbuf, int off, int len) throws java.io.IOException
read
in class java.io.Reader
cbuf
- Destination bufferoff
- Offset at which to start storing characterslen
- Maximum number of characters to readjava.io.IOException
- If an I/O error occurspublic long skip(long n) throws java.io.IOException
skip
in class java.io.Reader
n
- The number of characters to skipjava.io.IOException
- If an I/O error occurspublic void reset() throws java.io.IOException
reset
in class java.io.Reader
java.io.IOException
- public void close() throws java.io.IOException
close
in class java.io.Reader
java.io.IOException
- If an I/O error occurs
|
Bali Share 1.1.18 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |