public class ReaderCursor extends Object implements AutoCloseable
| Constructor and Description |
|---|
ReaderCursor(Reader r)
Creates a new instance of ReaderCursor using the underlying Reader as it's
datasource.
|
ReaderCursor(String s)
Create a cursor from a string.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the underlying reader.
|
int |
current() |
boolean |
eof() |
ParseException |
error(String message) |
ParseException |
error(String message,
Throwable e) |
boolean |
is(IntPredicate predicate) |
boolean |
is(String chars) |
int |
next()
Move cursor forward one position and get the character.
|
int |
read() |
String |
read(int count) |
void |
skip(String which)
Skip a character if it is contained into the passed string.
|
String |
toString() |
public ReaderCursor(Reader r)
public ReaderCursor(String s)
public ParseException error(String message, Throwable e)
message - The message.public ParseException error(String message)
message - The message.public int current()
public boolean is(IntPredicate predicate)
public boolean is(String chars)
public int next()
public int read()
public String read(int count)
public void skip(String which)
which - public boolean eof()
public void close()
throws Exception
close in interface AutoCloseableExceptionCopyright © 2016. All rights reserved.