public interface Parseable extends Closeable
| Modifier and Type | Field and Description |
|---|---|
static int |
END_OF_INPUT
The value returned by
read() to indicate the end of
input available through this Parseable. |
| Modifier and Type | Method and Description |
|---|---|
int |
read()
Read and return the next character from this Parseable as a
non-negative integer, or
END_OF_INPUT. |
void |
unread(int ch)
Unread
ch, such that the next call to read()
will return ch. |
static final int END_OF_INPUT
read() to indicate the end of
input available through this Parseable.int read()
throws IOException
END_OF_INPUT.END_OF_INPUTIOException - when we're unexpectedly unable to read the next
character.void unread(int ch)
throws IOException
ch, such that the next call to read()
will return ch. Unread can be used to unread at most
one character of input.
The behavior of calling unread before the first call
to read() is undefined. The behavior of calling
unread(ch) with something other than ch
returned by the most recent call to read() is
undefined. The behavior of calling unread(ch) more than
once without an intervening call to read() is
undefined.
ch - as returned by the previous call to read().IOException - when we're unexpectedly unable to push back the
given character.Copyright © 2019. All rights reserved.