1 package dolda.jsvc.next;
5 public class PeekReader extends Reader {
6 private final Reader back;
7 private boolean p = false;
10 public PeekReader(Reader back) {
14 public void close() throws IOException {
18 public int read() throws IOException {
27 public int read(char[] b, int off, int len) throws IOException {
33 b[off + r++] = (char)c;
38 public boolean ready() throws IOException {
44 protected boolean whitespace(char c) {
45 return(Character.isWhitespace(c));
48 public int peek(boolean skipws) throws IOException {
49 while(!p || (skipws && (la >= 0) && whitespace((char)la))) {
56 public int peek() throws IOException {