public CharInput(String s) { this(new StringReader(s)); }
public CharInput(Reader r) { this(r, null); }
- public CharInput(Reader r, String s) { this.r = r; }
+ public CharInput(Reader r, String s) { this.r = new BufferedReader(r); }
public CharInput(InputStream i) { this(i, null); }
public CharInput(InputStream i, String s) { this(new InputStreamReader(i), s); }
boolean cr = false;
private int count = 0;
public boolean isCR() { return cr; }
- public Character next() throws IOException {
+ public Character _next() throws IOException {
cr = false;
int i = r.read();
if (i==-1) { System.err.print("\r...done \r"); return null; }
char c = (char)i;
cr = c=='\n';
- System.err.print(" " + (count++) + "\r");
+ if ((count++) % 100 == 0)
+ System.err.print(" " + count + "\r");
return c;
}
}