|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.Reader
com.Ostermiller.util.CircularCharBuffer.CircularCharBufferReader
protected class CircularCharBuffer.CircularCharBufferReader
Class for reading from a circular character buffer.
| Field Summary |
|---|
| Fields inherited from class java.io.Reader |
|---|
lock |
| Constructor Summary | |
|---|---|
protected |
CircularCharBuffer.CircularCharBufferReader()
|
| 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)
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 |
reset()
Reset the stream. |
long |
skip(long n)
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 |
|---|
protected CircularCharBuffer.CircularCharBufferReader()
| Method Detail |
|---|
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.Readerjava.io.IOException - never.
public void mark(int readAheadLimit)
throws java.io.IOException
The readAheadLimit must be less than the size of circular buffer.
mark in class java.io.ReaderreadAheadLimit - Limit on the number of characters that may be read while
still preserving the mark. After reading this many characters, attempting to
reset the stream will fail.
java.io.IOException - if the stream is closed, or the buffer size is greater
than or equal to the readAheadLimit.public boolean markSupported()
markSupported in class java.io.Reader
public int read()
throws java.io.IOException
read in class java.io.Readerjava.io.IOException - if the stream is closed.
public int read(char[] cbuf)
throws java.io.IOException
read in class java.io.Readercbuf - Destination buffer.
java.io.IOException - if the stream is closed.
public int read(char[] cbuf,
int off,
int len)
throws java.io.IOException
read in class java.io.Readercbuf - Destination buffer.off - Offset at which to start storing characters.len - Maximum number of characters to read.
java.io.IOException - if the stream is closed.
public boolean ready()
throws java.io.IOException
ready in class java.io.Readerjava.io.IOException - if the stream is closed.
public void reset()
throws java.io.IOException
reset in class java.io.Readerjava.io.IOException - if the stream is closed.
public long skip(long n)
throws java.io.IOException,
java.lang.IllegalArgumentException
skip in class java.io.Readern - The number of characters to skip
java.lang.IllegalArgumentException - if n is negative.
java.io.IOException - if the stream is closed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||