Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / java / io / ByteArrayInputStream.js
index 68e0eb6..18d306d 100644 (file)
@@ -1,70 +1,70 @@
-Clazz.load (["java.io.InputStream"], "java.io.ByteArrayInputStream", ["java.lang.IndexOutOfBoundsException", "$.NullPointerException"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.buf = null;\r
-this.pos = 0;\r
-this.$mark = 0;\r
-this.count = 0;\r
-Clazz.instantialize (this, arguments);\r
-}, java.io, "ByteArrayInputStream", java.io.InputStream);\r
-Clazz.makeConstructor (c$, \r
-function (buf) {\r
-Clazz.superConstructor (this, java.io.ByteArrayInputStream, []);\r
-this.buf = buf;\r
-this.pos = 0;\r
-this.count = buf.length;\r
-}, "~A");\r
-Clazz.overrideMethod (c$, "readByteAsInt", \r
-function () {\r
-return (this.pos < this.count) ? (this.buf[this.pos++] & 0xff) : -1;\r
-});\r
-Clazz.overrideMethod (c$, "read", \r
-function (b, off, len) {\r
-if (b == null) {\r
-throw  new NullPointerException ();\r
-}\r
-    if (arguments.length == 1) { off = 0; len = b.length; }\r
-\r
-if (off < 0 || len < 0 || len > b.length - off) {\r
-throw  new IndexOutOfBoundsException ();\r
-}if (this.pos >= this.count) {\r
-return -1;\r
-}var avail = this.count - this.pos;\r
-if (len > avail) {\r
-len = avail;\r
-}if (len <= 0) {\r
-return 0;\r
-}System.arraycopy (this.buf, this.pos, b, off, len);\r
-this.pos += len;\r
-return len;\r
-}, "~A,~N,~N");\r
-Clazz.overrideMethod (c$, "skip", \r
-function (n) {\r
-var k = this.count - this.pos;\r
-if (n < k) {\r
-k = n < 0 ? 0 : n;\r
-}this.pos += k;\r
-return k;\r
-}, "~N");\r
-Clazz.overrideMethod (c$, "available", \r
-function () {\r
-return this.count - this.pos;\r
-});\r
-Clazz.overrideMethod (c$, "markSupported", \r
-function () {\r
-return true;\r
-});\r
-Clazz.overrideMethod (c$, "mark", \r
-function (readAheadLimit) {\r
-this.$mark = this.pos;\r
-}, "~N");\r
-Clazz.overrideMethod (c$, "resetStream", \r
-function () {\r
-});\r
-Clazz.overrideMethod (c$, "reset", \r
-function () {\r
-this.pos = this.$mark;\r
-});\r
-Clazz.overrideMethod (c$, "close", \r
-function () {\r
-});\r
-});\r
+Clazz.load (["java.io.InputStream"], "java.io.ByteArrayInputStream", ["java.lang.IndexOutOfBoundsException", "$.NullPointerException"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.buf = null;
+this.pos = 0;
+this.$mark = 0;
+this.count = 0;
+Clazz.instantialize (this, arguments);
+}, java.io, "ByteArrayInputStream", java.io.InputStream);
+Clazz.makeConstructor (c$, 
+function (buf) {
+Clazz.superConstructor (this, java.io.ByteArrayInputStream, []);
+this.buf = buf;
+this.pos = 0;
+this.count = buf.length;
+}, "~A");
+Clazz.overrideMethod (c$, "readByteAsInt", 
+function () {
+return (this.pos < this.count) ? (this.buf[this.pos++] & 0xff) : -1;
+});
+Clazz.overrideMethod (c$, "read", 
+function (b, off, len) {
+if (b == null) {
+throw  new NullPointerException ();
+}
+    if (arguments.length == 1) { off = 0; len = b.length; }
+
+if (off < 0 || len < 0 || len > b.length - off) {
+throw  new IndexOutOfBoundsException ();
+}if (this.pos >= this.count) {
+return -1;
+}var avail = this.count - this.pos;
+if (len > avail) {
+len = avail;
+}if (len <= 0) {
+return 0;
+}System.arraycopy (this.buf, this.pos, b, off, len);
+this.pos += len;
+return len;
+}, "~A,~N,~N");
+Clazz.overrideMethod (c$, "skip", 
+function (n) {
+var k = this.count - this.pos;
+if (n < k) {
+k = n < 0 ? 0 : n;
+}this.pos += k;
+return k;
+}, "~N");
+Clazz.overrideMethod (c$, "available", 
+function () {
+return this.count - this.pos;
+});
+Clazz.overrideMethod (c$, "markSupported", 
+function () {
+return true;
+});
+Clazz.overrideMethod (c$, "mark", 
+function (readAheadLimit) {
+this.$mark = this.pos;
+}, "~N");
+Clazz.overrideMethod (c$, "resetStream", 
+function () {
+});
+Clazz.overrideMethod (c$, "reset", 
+function () {
+this.pos = this.$mark;
+});
+Clazz.overrideMethod (c$, "close", 
+function () {
+});
+});