keep a copy of my current dissertation example to investiaget further and another...
[IRC.git] / Robust / src / ClassLibrary / MGC / Scanner.java
index 31b4567e77b2d0a06eabac317961214eb7150c89..2767e53f8c2a22c42672ef7fc543c4b3a90f58f0 100644 (file)
@@ -1,22 +1,21 @@
 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