@GwtIncompatible final class CharSequenceReader extends java.io.Reader
Reader
that reads the characters in a CharSequence
. Like StringReader
,
but works with any CharSequence
.Modifier and Type | Field and Description |
---|---|
private int |
mark |
private int |
pos |
private java.lang.CharSequence |
seq |
Constructor and Description |
---|
CharSequenceReader(java.lang.CharSequence seq)
Creates a new reader wrapping the given character sequence.
|
Modifier and Type | Method and Description |
---|---|
private void |
checkOpen() |
void |
close() |
private boolean |
hasRemaining() |
void |
mark(int readAheadLimit) |
boolean |
markSupported() |
int |
read() |
int |
read(char[] cbuf,
int off,
int len) |
int |
read(java.nio.CharBuffer target) |
boolean |
ready() |
private int |
remaining() |
void |
reset() |
long |
skip(long n) |
public CharSequenceReader(java.lang.CharSequence seq)
private void checkOpen() throws java.io.IOException
java.io.IOException
private boolean hasRemaining()
private int remaining()
public int read(java.nio.CharBuffer target) throws java.io.IOException
read
in interface java.lang.Readable
read
in class java.io.Reader
java.io.IOException
public int read() throws java.io.IOException
read
in class java.io.Reader
java.io.IOException
public int read(char[] cbuf, int off, int len) throws java.io.IOException
read
in class java.io.Reader
java.io.IOException
public long skip(long n) throws java.io.IOException
skip
in class java.io.Reader
java.io.IOException
public boolean ready() throws java.io.IOException
ready
in class java.io.Reader
java.io.IOException
public boolean markSupported()
markSupported
in class java.io.Reader
public void mark(int readAheadLimit) throws java.io.IOException
mark
in class java.io.Reader
java.io.IOException
public void reset() throws java.io.IOException
reset
in class java.io.Reader
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.Reader
java.io.IOException