1 Clazz.declarePackage ("JU");
2 Clazz.load (["java.io.BufferedReader"], "JU.DataReader", ["java.io.StringReader"], function () {
3 c$ = Clazz.decorateAsClass (function () {
5 Clazz.instantialize (this, arguments);
6 }, JU, "DataReader", java.io.BufferedReader);
7 Clazz.makeConstructor (c$,
9 Clazz.superConstructor (this, JU.DataReader, [ new java.io.StringReader ("")]);
11 Clazz.defineMethod (c$, "getBufferedReader",
15 Clazz.defineMethod (c$, "readBuf",
16 function (buf, off, len) {
18 var line = this.readLine ();
19 if (line == null) return 0;
21 var linelen = line.length;
22 for (var i = off; i < len && linelen >= 0; i++) {
23 if (linept >= linelen) {
26 line = this.readLine ();
27 linelen = (line == null ? -1 : line.length);
29 buf[i] = line.charAt (linept++);