Extract the next character from the input without consuming it. @return the next input character as an unsigned UTF-16 code unit (0-65535); #EOF if input is exhausted
()
| 91 | * input is exhausted |
| 92 | */ |
| 93 | public int peek() { |
| 94 | int next = position + 1; |
| 95 | if (next < filled) { |
| 96 | return buffer[next]; |
| 97 | } |
| 98 | return fill() ? buffer[position + 1] : EOF; |
| 99 | } |
| 100 | |
| 101 | /** |
| 102 | * Read and consume the next character from the input. |