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.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the underlying reader.
|
void |
consume()
Invalidate current character without reading the next one.
|
int |
current() |
ParseException |
error(String message)
An exception with the specified message.
|
ParseException |
error(String message,
Throwable e)
An exception with the specified message.
|
int |
next()
Consume the current character and return the next available.
|
String |
next(int count) |
public ReaderCursor(Reader r)
public ParseException error(String message, Throwable e)
message - The message.public ParseException error(String message)
message - The message.public int current()
Note: If the current character is consumed. The next one is loaded from the underlying reader.
public int next()
public String next(int count)
count - public void consume()
public void close()
throws Exception
close in interface AutoCloseableExceptionCopyright © 2014. All rights reserved.