protected class CircularCharBuffer.CircularCharBufferReader
extends java.io.Reader
| Modifier | Constructor and Description |
|---|---|
protected |
CircularCharBufferReader() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose 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.Readerpublic 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 skipjava.lang.IllegalArgumentException - if n is negative.java.io.IOException - if the stream is closed.Copyright (c) 2001-2020 by Stephen Ostermiller