X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fj2s%2Fjava%2Fio%2FReader.js;h=6468aca20cc9f4018eca27360b83bbd361430837;hp=7a2c1d5fbce3399bf90ed44d1b9fb75ebd9ea68b;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=8ffd05b3abe52c0b6b79b011c0966361f82d5fe6 diff --git a/site/j2s/java/io/Reader.js b/site/j2s/java/io/Reader.js index 7a2c1d5..6468aca 100644 --- a/site/j2s/java/io/Reader.js +++ b/site/j2s/java/io/Reader.js @@ -1,45 +1,45 @@ -Clazz.load (["java.io.Closeable"], "java.io.Reader", ["java.io.IOException", "java.lang.IllegalArgumentException", "$.NullPointerException"], function () { -c$ = Clazz.decorateAsClass (function () { -this.lock = null; -this.skipBuffer = null; -Clazz.instantialize (this, arguments); -}, java.io, "Reader", null, java.io.Closeable); -Clazz.makeConstructor (c$, -function (lock) { -if (lock == null) { -throw new NullPointerException (); -}this.lock = lock; -}, "~O"); -Clazz.defineMethod (c$, "skip", -function (n) { -if (n < 0) throw new IllegalArgumentException ("skip value is negative"); -var nn = Math.min (n, 8192); -{ -if ((this.skipBuffer == null) || (this.skipBuffer.length < nn)) this.skipBuffer = Clazz.newCharArray (nn, '\0'); -var r = n; -while (r > 0) { -var nc = this.read (this.skipBuffer, 0, Math.min (r, nn)); -if (nc == -1) break; -r -= nc; -} -return n - r; -}}, "~N"); -Clazz.defineMethod (c$, "ready", -function () { -return false; -}); -Clazz.defineMethod (c$, "markSupported", -function () { -return false; -}); -Clazz.defineMethod (c$, "mark", -function (readAheadLimit) { -throw new java.io.IOException ("mark() not supported"); -}, "~N"); -Clazz.defineMethod (c$, "reset", -function () { -throw new java.io.IOException ("reset() not supported"); -}); -Clazz.defineStatics (c$, -"MAX_SKIP_BUFFE_SIZE", 8192); -}); +Clazz.load (["java.io.Closeable"], "java.io.Reader", ["java.io.IOException", "java.lang.IllegalArgumentException", "$.NullPointerException"], function () { +c$ = Clazz.decorateAsClass (function () { +this.lock = null; +this.skipBuffer = null; +Clazz.instantialize (this, arguments); +}, java.io, "Reader", null, java.io.Closeable); +Clazz.makeConstructor (c$, +function (lock) { +if (lock == null) { +throw new NullPointerException (); +}this.lock = lock; +}, "~O"); +Clazz.defineMethod (c$, "skip", +function (n) { +if (n < 0) throw new IllegalArgumentException ("skip value is negative"); +var nn = Math.min (n, 8192); +{ +if ((this.skipBuffer == null) || (this.skipBuffer.length < nn)) this.skipBuffer = Clazz.newCharArray (nn, '\0'); +var r = n; +while (r > 0) { +var nc = this.read (this.skipBuffer, 0, Math.min (r, nn)); +if (nc == -1) break; +r -= nc; +} +return n - r; +}}, "~N"); +Clazz.defineMethod (c$, "ready", +function () { +return false; +}); +Clazz.defineMethod (c$, "markSupported", +function () { +return false; +}); +Clazz.defineMethod (c$, "mark", +function (readAheadLimit) { +throw new java.io.IOException ("mark() not supported"); +}, "~N"); +Clazz.defineMethod (c$, "reset", +function () { +throw new java.io.IOException ("reset() not supported"); +}); +Clazz.defineStatics (c$, +"MAX_SKIP_BUFFE_SIZE", 8192); +});