public class Scanner implements Iterator {\r
- private String sourcename;\r
+ private FileInputStream source;\r
private int currentpos;\r
+ private int isHighbits;\r
+ private int fd;\r
\r
public Scanner (final String source) {\r
- this.sourcename = source;\r
+ this.source = new FileInputStream(source);\r
+ this.fd = this.source.getfd();\r
this.currentpos = 0;\r
+ this.isHighbits = 1;\r
}\r
\r
public void close () {\r
+ this.source.close();\r
}\r
\r
- public double nextDouble () {\r
- return Double.parseDouble(new String(next()));\r
- }\r
+ public native double nextDouble ();\r
\r
- public int nextInt () {\r
- return Integer.parseInt(new String(next()));\r
- }\r
- \r
- private native char[] next();\r
+ public native int nextInt ();\r
}\r