X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fj2s%2Fjava%2Fio%2FSequenceInputStream.js;fp=site%2Fj2s%2Fjava%2Fio%2FSequenceInputStream.js;h=c92bb1d4688f10588c2839136d8895a6ecf2de6c;hp=171447f7808fecb90aab1557d8b2e71fa4c1003d;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=7301a2415adab88038b291fc54caeeb3a5a47a44 diff --git a/site/j2s/java/io/SequenceInputStream.js b/site/j2s/java/io/SequenceInputStream.js index 171447f..c92bb1d 100644 --- a/site/j2s/java/io/SequenceInputStream.js +++ b/site/j2s/java/io/SequenceInputStream.js @@ -1,85 +1,85 @@ -Clazz.load (["java.io.InputStream"], "java.io.SequenceInputStream", ["java.lang.Error", "$.IndexOutOfBoundsException", "$.NullPointerException", "java.util.Vector"], function () { -c$ = Clazz.decorateAsClass (function () { -this.e = null; -this.$in = null; -Clazz.instantialize (this, arguments); -}, java.io, "SequenceInputStream", java.io.InputStream); -Clazz.makeConstructor (c$, -function (e) { -Clazz.superConstructor (this, java.io.SequenceInputStream, []); -this.e = e; -try { -this.nextStream (); -} catch (ex) { -if (Clazz.exceptionOf (ex, java.io.IOException)) { -throw new Error ("panic"); -} else { -throw ex; -} -} -}, "java.util.Enumeration"); -Clazz.makeConstructor (c$, -function (s1, s2) { -Clazz.superConstructor (this, java.io.SequenceInputStream, []); -var v = new java.util.Vector (2); -v.addElement (s1); -v.addElement (s2); -this.e = v.elements (); -try { -this.nextStream (); -} catch (ex) { -if (Clazz.exceptionOf (ex, java.io.IOException)) { -throw new Error ("panic"); -} else { -throw ex; -} -} -}, "java.io.InputStream,java.io.InputStream"); -Clazz.defineMethod (c$, "nextStream", -function () { -if (this.$in != null) { -this.$in.close (); -}if (this.e.hasMoreElements ()) { -this.$in = this.e.nextElement (); -if (this.$in == null) throw new NullPointerException (); -} else this.$in = null; -}); -Clazz.defineMethod (c$, "available", -function () { -if (this.$in == null) { -return 0; -}return this.$in.available (); -}); -Clazz.defineMethod (c$, "readByteAsInt", -function () { -if (this.$in == null) { -return -1; -}var c = this.$in.readByteAsInt (); -if (c == -1) { -this.nextStream (); -return this.readByteAsInt (); -}return c; -}); -Clazz.defineMethod (c$, "read", -function (b, off, len) { -if (this.$in == null) { -return -1; -} else if (b == null) { -throw new NullPointerException (); -} else if (off < 0 || len < 0 || len > b.length - off) { -throw new IndexOutOfBoundsException (); -} else if (len == 0) { -return 0; -}var n = this.$in.read (b, off, len); -if (n <= 0) { -this.nextStream (); -return this.read (b, off, len); -}return n; -}, "~A,~N,~N"); -Clazz.defineMethod (c$, "close", -function () { -do { -this.nextStream (); -} while (this.$in != null); -}); -}); +Clazz.load (["java.io.InputStream"], "java.io.SequenceInputStream", ["java.lang.Error", "$.IndexOutOfBoundsException", "$.NullPointerException", "java.util.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.e = null; +this.$in = null; +Clazz.instantialize (this, arguments); +}, java.io, "SequenceInputStream", java.io.InputStream); +Clazz.makeConstructor (c$, +function (e) { +Clazz.superConstructor (this, java.io.SequenceInputStream, []); +this.e = e; +try { +this.nextStream (); +} catch (ex) { +if (Clazz.exceptionOf (ex, java.io.IOException)) { +throw new Error ("panic"); +} else { +throw ex; +} +} +}, "java.util.Enumeration"); +Clazz.makeConstructor (c$, +function (s1, s2) { +Clazz.superConstructor (this, java.io.SequenceInputStream, []); +var v = new java.util.Vector (2); +v.addElement (s1); +v.addElement (s2); +this.e = v.elements (); +try { +this.nextStream (); +} catch (ex) { +if (Clazz.exceptionOf (ex, java.io.IOException)) { +throw new Error ("panic"); +} else { +throw ex; +} +} +}, "java.io.InputStream,java.io.InputStream"); +Clazz.defineMethod (c$, "nextStream", +function () { +if (this.$in != null) { +this.$in.close (); +}if (this.e.hasMoreElements ()) { +this.$in = this.e.nextElement (); +if (this.$in == null) throw new NullPointerException (); +} else this.$in = null; +}); +Clazz.defineMethod (c$, "available", +function () { +if (this.$in == null) { +return 0; +}return this.$in.available (); +}); +Clazz.defineMethod (c$, "readByteAsInt", +function () { +if (this.$in == null) { +return -1; +}var c = this.$in.readByteAsInt (); +if (c == -1) { +this.nextStream (); +return this.readByteAsInt (); +}return c; +}); +Clazz.defineMethod (c$, "read", +function (b, off, len) { +if (this.$in == null) { +return -1; +} else if (b == null) { +throw new NullPointerException (); +} else if (off < 0 || len < 0 || len > b.length - off) { +throw new IndexOutOfBoundsException (); +} else if (len == 0) { +return 0; +}var n = this.$in.read (b, off, len); +if (n <= 0) { +this.nextStream (); +return this.read (b, off, len); +}return n; +}, "~A,~N,~N"); +Clazz.defineMethod (c$, "close", +function () { +do { +this.nextStream (); +} while (this.$in != null); +}); +});