Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / java / io / StringReader.js
index b9d6520..c3a8ac2 100644 (file)
@@ -1,71 +1,71 @@
-Clazz.load (["java.io.Reader"], "java.io.StringReader", ["java.io.IOException", "java.lang.IllegalArgumentException", "$.IndexOutOfBoundsException"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.str = null;\r
-this.length = 0;\r
-this.next = 0;\r
-this.$mark = 0;\r
-Clazz.instantialize (this, arguments);\r
-}, java.io, "StringReader", java.io.Reader);\r
-Clazz.makeConstructor (c$, \r
-function (s) {\r
-Clazz.superConstructor (this, java.io.StringReader, [s]);\r
-this.str = s;\r
-this.length = s.length;\r
-}, "~S");\r
-Clazz.defineMethod (c$, "ensureOpen", \r
- function () {\r
-if (this.str == null) throw  new java.io.IOException ("Stream closed");\r
-});\r
-Clazz.overrideMethod (c$, "read", \r
-function (cbuf, off, len) {\r
-{\r
-this.ensureOpen ();\r
-if ((off < 0) || (off > cbuf.length) || (len < 0) || ((off + len) > cbuf.length) || ((off + len) < 0)) {\r
-throw  new IndexOutOfBoundsException ();\r
-} else if (len == 0) {\r
-return 0;\r
-}if (this.next >= this.length) return -1;\r
-var n = Math.min (this.length - this.next, len);\r
-this.str.getChars (this.next, this.next + n, cbuf, off);\r
-this.next += n;\r
-return n;\r
-}}, "~A,~N,~N");\r
-Clazz.overrideMethod (c$, "skip", \r
-function (ns) {\r
-{\r
-this.ensureOpen ();\r
-if (this.next >= this.length) return 0;\r
-var n = Math.min (this.length - this.next, ns);\r
-n = Math.max (-this.next, n);\r
-this.next += n;\r
-return n;\r
-}}, "~N");\r
-Clazz.overrideMethod (c$, "ready", \r
-function () {\r
-{\r
-this.ensureOpen ();\r
-return true;\r
-}});\r
-Clazz.overrideMethod (c$, "markSupported", \r
-function () {\r
-return true;\r
-});\r
-Clazz.overrideMethod (c$, "mark", \r
-function (readAheadLimit) {\r
-if (readAheadLimit < 0) {\r
-throw  new IllegalArgumentException ("Read-ahead limit < 0");\r
-}{\r
-this.ensureOpen ();\r
-this.$mark = this.next;\r
-}}, "~N");\r
-Clazz.overrideMethod (c$, "reset", \r
-function () {\r
-{\r
-this.ensureOpen ();\r
-this.next = this.$mark;\r
-}});\r
-Clazz.overrideMethod (c$, "close", \r
-function () {\r
-this.str = null;\r
-});\r
-});\r
+Clazz.load (["java.io.Reader"], "java.io.StringReader", ["java.io.IOException", "java.lang.IllegalArgumentException", "$.IndexOutOfBoundsException"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.str = null;
+this.length = 0;
+this.next = 0;
+this.$mark = 0;
+Clazz.instantialize (this, arguments);
+}, java.io, "StringReader", java.io.Reader);
+Clazz.makeConstructor (c$, 
+function (s) {
+Clazz.superConstructor (this, java.io.StringReader, [s]);
+this.str = s;
+this.length = s.length;
+}, "~S");
+Clazz.defineMethod (c$, "ensureOpen", 
+ function () {
+if (this.str == null) throw  new java.io.IOException ("Stream closed");
+});
+Clazz.overrideMethod (c$, "read", 
+function (cbuf, off, len) {
+{
+this.ensureOpen ();
+if ((off < 0) || (off > cbuf.length) || (len < 0) || ((off + len) > cbuf.length) || ((off + len) < 0)) {
+throw  new IndexOutOfBoundsException ();
+} else if (len == 0) {
+return 0;
+}if (this.next >= this.length) return -1;
+var n = Math.min (this.length - this.next, len);
+this.str.getChars (this.next, this.next + n, cbuf, off);
+this.next += n;
+return n;
+}}, "~A,~N,~N");
+Clazz.overrideMethod (c$, "skip", 
+function (ns) {
+{
+this.ensureOpen ();
+if (this.next >= this.length) return 0;
+var n = Math.min (this.length - this.next, ns);
+n = Math.max (-this.next, n);
+this.next += n;
+return n;
+}}, "~N");
+Clazz.overrideMethod (c$, "ready", 
+function () {
+{
+this.ensureOpen ();
+return true;
+}});
+Clazz.overrideMethod (c$, "markSupported", 
+function () {
+return true;
+});
+Clazz.overrideMethod (c$, "mark", 
+function (readAheadLimit) {
+if (readAheadLimit < 0) {
+throw  new IllegalArgumentException ("Read-ahead limit < 0");
+}{
+this.ensureOpen ();
+this.$mark = this.next;
+}}, "~N");
+Clazz.overrideMethod (c$, "reset", 
+function () {
+{
+this.ensureOpen ();
+this.next = this.$mark;
+}});
+Clazz.overrideMethod (c$, "close", 
+function () {
+this.str = null;
+});
+});