|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.Reader
com.imagero.uio.io.StringArrayReader
A character stream whose source is a string array. Very similar to java.io.StringReader.
Field Summary |
Fields inherited from class java.io.Reader |
lock |
Constructor Summary | |
StringArrayReader(java.lang.String[] s)
Create a new StringArrayReader. |
Method Summary | |
void |
close()
Close the stream. |
void |
mark(int readAheadLimit)
Mark the present position in the stream. |
boolean |
markSupported()
Tell whether this stream supports the mark() operation. |
int |
read()
Read a single character. |
int |
read(char[] cbuf,
int off,
int len)
Read characters into a portion of supplied char array. |
boolean |
ready()
Tell whether this stream is ready to be read. |
void |
reset()
Reset the stream to the most recent mark, or to the beginning of the string if it has never been marked. |
long |
skip(long ns)
Skip characters. |
Methods inherited from class java.io.Reader |
read |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StringArrayReader(java.lang.String[] s)
s
- String array providing the character stream.Method Detail |
public int read() throws java.io.IOException
java.io.IOException
- If an I/O error occurspublic int read(char[] cbuf, int off, int len) throws java.io.IOException
cbuf
- Destination char arrayoff
- Where to start writing characterslen
- Maximum number of characters to read
java.io.IOException
- If an I/O error occurspublic long skip(long ns) throws java.io.IOException
java.io.IOException
- If an I/O error occurspublic boolean ready() throws java.io.IOException
java.io.IOException
- If the stream is closedpublic boolean markSupported()
public void mark(int readAheadLimit) throws java.io.IOException
readAheadLimit
- Limit on the number of characters that may be
read while still preserving the mark.
java.lang.IllegalArgumentException
- If readAheadLimit is < 0
java.io.IOException
- If an I/O error occurspublic void reset() throws java.io.IOException
java.io.IOException
- If an I/O error occurspublic void close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |