X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fswingjs%2Fj2s%2Fjava%2Futil%2Fzip%2FCheckedInputStream.js;fp=site%2Fswingjs%2Fj2s%2Fjava%2Futil%2Fzip%2FCheckedInputStream.js;h=75e79dae86159a69c91e0bf7d61d173b0f27da75;hp=afae57c896c23c3d7c103008604e1c655057d390;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=7301a2415adab88038b291fc54caeeb3a5a47a44 diff --git a/site/swingjs/j2s/java/util/zip/CheckedInputStream.js b/site/swingjs/j2s/java/util/zip/CheckedInputStream.js index afae57c..75e79da 100644 --- a/site/swingjs/j2s/java/util/zip/CheckedInputStream.js +++ b/site/swingjs/j2s/java/util/zip/CheckedInputStream.js @@ -1,44 +1,44 @@ -Clazz.declarePackage ("java.util.zip"); -Clazz.load (["java.io.FilterInputStream"], "java.util.zip.CheckedInputStream", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.cksum = null; -Clazz.instantialize (this, arguments); -}, java.util.zip, "CheckedInputStream", java.io.FilterInputStream); -Clazz.defineMethod (c$, "set", -function (cksum) { -this.$in = this.$in; -this.cksum = cksum; -return this; -}, "JU.Checksum"); -Clazz.overrideMethod (c$, "readByteAsInt", -function () { -var b = this.$in.readByteAsInt (); -if (b != -1) { -this.cksum.updateByteAsInt (b); -}return b; -}); -Clazz.overrideMethod (c$, "read", -function (buf, off, len) { -len = this.$in.read (buf, off, len); -if (len != -1) { -this.cksum.update (buf, off, len); -}return len; -}, "~A,~N,~N"); -Clazz.overrideMethod (c$, "skip", -function (n) { -var buf = Clazz.newByteArray (512, 0); -var total = 0; -while (total < n) { -var len = n - total; -len = this.read (buf, 0, len < buf.length ? len : buf.length); -if (len == -1) { -return total; -}total += len; -} -return total; -}, "~N"); -Clazz.defineMethod (c$, "getChecksum", -function () { -return this.cksum; -}); -}); +Clazz.declarePackage ("java.util.zip"); +Clazz.load (["java.io.FilterInputStream"], "java.util.zip.CheckedInputStream", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.cksum = null; +Clazz.instantialize (this, arguments); +}, java.util.zip, "CheckedInputStream", java.io.FilterInputStream); +Clazz.defineMethod (c$, "set", +function (cksum) { +this.$in = this.$in; +this.cksum = cksum; +return this; +}, "JU.Checksum"); +Clazz.overrideMethod (c$, "readByteAsInt", +function () { +var b = this.$in.readByteAsInt (); +if (b != -1) { +this.cksum.updateByteAsInt (b); +}return b; +}); +Clazz.overrideMethod (c$, "read", +function (buf, off, len) { +len = this.$in.read (buf, off, len); +if (len != -1) { +this.cksum.update (buf, off, len); +}return len; +}, "~A,~N,~N"); +Clazz.overrideMethod (c$, "skip", +function (n) { +var buf = Clazz.newByteArray (512, 0); +var total = 0; +while (total < n) { +var len = n - total; +len = this.read (buf, 0, len < buf.length ? len : buf.length); +if (len == -1) { +return total; +}total += len; +} +return total; +}, "~N"); +Clazz.defineMethod (c$, "getChecksum", +function () { +return this.cksum; +}); +});