JAL-1807 test
[jalviewjs.git] / bin / javajs / img / CRCEncoder.js
index 3a7582e..2dca50d 100644 (file)
@@ -1,74 +1,74 @@
-Clazz.declarePackage ("javajs.img");\r
-Clazz.load (["javajs.img.ImageEncoder"], "javajs.img.CRCEncoder", ["java.util.zip.CRC32", "javajs.util.AU"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.startPos = 0;\r
-this.bytePos = 0;\r
-this.crc = null;\r
-this.pngBytes = null;\r
-this.dataLen = 0;\r
-this.int2 = null;\r
-this.int4 = null;\r
-Clazz.instantialize (this, arguments);\r
-}, javajs.img, "CRCEncoder", javajs.img.ImageEncoder);\r
-Clazz.prepareFields (c$, function () {\r
-this.int2 =  Clazz.newByteArray (2, 0);\r
-this.int4 =  Clazz.newByteArray (4, 0);\r
-});\r
-Clazz.makeConstructor (c$, \r
-function () {\r
-Clazz.superConstructor (this, javajs.img.CRCEncoder, []);\r
-this.pngBytes =  Clazz.newByteArray (250, 0);\r
-this.crc =  new java.util.zip.CRC32 ();\r
-});\r
-Clazz.defineMethod (c$, "setData", \r
-function (b, pt) {\r
-this.pngBytes = b;\r
-this.dataLen = b.length;\r
-this.startPos = this.bytePos = pt;\r
-}, "~A,~N");\r
-Clazz.defineMethod (c$, "getBytes", \r
-function () {\r
-return (this.dataLen == this.pngBytes.length ? this.pngBytes : javajs.util.AU.arrayCopyByte (this.pngBytes, this.dataLen));\r
-});\r
-Clazz.defineMethod (c$, "writeCRC", \r
-function () {\r
-this.crc.reset ();\r
-this.crc.update (this.pngBytes, this.startPos, this.bytePos - this.startPos);\r
-this.writeInt4 (this.crc.getValue ());\r
-});\r
-Clazz.defineMethod (c$, "writeInt2", \r
-function (n) {\r
-this.int2[0] = ((n >> 8) & 0xff);\r
-this.int2[1] = (n & 0xff);\r
-this.writeBytes (this.int2);\r
-}, "~N");\r
-Clazz.defineMethod (c$, "writeInt4", \r
-function (n) {\r
-javajs.img.CRCEncoder.getInt4 (n, this.int4);\r
-this.writeBytes (this.int4);\r
-}, "~N");\r
-c$.getInt4 = Clazz.defineMethod (c$, "getInt4", \r
-function (n, int4) {\r
-int4[0] = ((n >> 24) & 0xff);\r
-int4[1] = ((n >> 16) & 0xff);\r
-int4[2] = ((n >> 8) & 0xff);\r
-int4[3] = (n & 0xff);\r
-}, "~N,~A");\r
-Clazz.defineMethod (c$, "writeByte", \r
-function (b) {\r
-var temp =  Clazz.newByteArray (-1, [b]);\r
-this.writeBytes (temp);\r
-}, "~N");\r
-Clazz.defineMethod (c$, "writeString", \r
-function (s) {\r
-this.writeBytes (s.getBytes ());\r
-}, "~S");\r
-Clazz.defineMethod (c$, "writeBytes", \r
-function (data) {\r
-var newPos = this.bytePos + data.length;\r
-this.dataLen = Math.max (this.dataLen, newPos);\r
-if (newPos > this.pngBytes.length) this.pngBytes = javajs.util.AU.arrayCopyByte (this.pngBytes, newPos + 16);\r
-System.arraycopy (data, 0, this.pngBytes, this.bytePos, data.length);\r
-this.bytePos = newPos;\r
-}, "~A");\r
-});\r
+Clazz.declarePackage ("javajs.img");
+Clazz.load (["javajs.img.ImageEncoder"], "javajs.img.CRCEncoder", ["java.util.zip.CRC32", "javajs.util.AU"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.startPos = 0;
+this.bytePos = 0;
+this.crc = null;
+this.pngBytes = null;
+this.dataLen = 0;
+this.int2 = null;
+this.int4 = null;
+Clazz.instantialize (this, arguments);
+}, javajs.img, "CRCEncoder", javajs.img.ImageEncoder);
+Clazz.prepareFields (c$, function () {
+this.int2 =  Clazz.newByteArray (2, 0);
+this.int4 =  Clazz.newByteArray (4, 0);
+});
+Clazz.makeConstructor (c$, 
+function () {
+Clazz.superConstructor (this, javajs.img.CRCEncoder, []);
+this.pngBytes =  Clazz.newByteArray (250, 0);
+this.crc =  new java.util.zip.CRC32 ();
+});
+Clazz.defineMethod (c$, "setData", 
+function (b, pt) {
+this.pngBytes = b;
+this.dataLen = b.length;
+this.startPos = this.bytePos = pt;
+}, "~A,~N");
+Clazz.defineMethod (c$, "getBytes", 
+function () {
+return (this.dataLen == this.pngBytes.length ? this.pngBytes : javajs.util.AU.arrayCopyByte (this.pngBytes, this.dataLen));
+});
+Clazz.defineMethod (c$, "writeCRC", 
+function () {
+this.crc.reset ();
+this.crc.update (this.pngBytes, this.startPos, this.bytePos - this.startPos);
+this.writeInt4 (this.crc.getValue ());
+});
+Clazz.defineMethod (c$, "writeInt2", 
+function (n) {
+this.int2[0] = ((n >> 8) & 0xff);
+this.int2[1] = (n & 0xff);
+this.writeBytes (this.int2);
+}, "~N");
+Clazz.defineMethod (c$, "writeInt4", 
+function (n) {
+javajs.img.CRCEncoder.getInt4 (n, this.int4);
+this.writeBytes (this.int4);
+}, "~N");
+c$.getInt4 = Clazz.defineMethod (c$, "getInt4", 
+function (n, int4) {
+int4[0] = ((n >> 24) & 0xff);
+int4[1] = ((n >> 16) & 0xff);
+int4[2] = ((n >> 8) & 0xff);
+int4[3] = (n & 0xff);
+}, "~N,~A");
+Clazz.defineMethod (c$, "writeByte", 
+function (b) {
+var temp =  Clazz.newByteArray (-1, [b]);
+this.writeBytes (temp);
+}, "~N");
+Clazz.defineMethod (c$, "writeString", 
+function (s) {
+this.writeBytes (s.getBytes ());
+}, "~S");
+Clazz.defineMethod (c$, "writeBytes", 
+function (data) {
+var newPos = this.bytePos + data.length;
+this.dataLen = Math.max (this.dataLen, newPos);
+if (newPos > this.pngBytes.length) this.pngBytes = javajs.util.AU.arrayCopyByte (this.pngBytes, newPos + 16);
+System.arraycopy (data, 0, this.pngBytes, this.bytePos, data.length);
+this.bytePos = newPos;
+}, "~A");
+});