- public CharInput(String s) { this(new StringReader(s)); }
- public CharInput(Reader r) { this(r, null); }
- public CharInput(Reader r, String s) { this.r = new RollbackReader(new BufferedReader(r)); }
- public CharInput(InputStream i) { this(i, null); }
- public CharInput(InputStream i, String s) { this(new InputStreamReader(i), s); }
+ public CharInput(Reader r, String s) {
+ this.name = s;
+ this.r = new RollbackReader(new BufferedReader(r));
+ }
+ public CharInput(String s) { this(new StringReader(s)); }
+ public CharInput(Reader r) { this(r, null); }
+ public CharInput(InputStream i) { this(i, null); }
+ public CharInput(InputStream i, String s) { this(new InputStreamReader(i), s); }
+ public CharInput(File f) throws IOException { this(new FileInputStream(f), f.getName()); }