Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / JU / GZIPHeader.js
index 924a361..9c54bbf 100644 (file)
-Clazz.declarePackage ("JU");\r
-Clazz.load (null, "JU.GZIPHeader", ["JU.ZStream", "java.lang.IllegalArgumentException", "$.InternalError"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.text = false;\r
-this.fhcrc = false;\r
-this.time = 0;\r
-this.xflags = 0;\r
-this.os = 255;\r
-this.extra = null;\r
-this.name = null;\r
-this.comment = null;\r
-this.hcrc = 0;\r
-this.crc = 0;\r
-this.done = false;\r
-this.mtime = 0;\r
-Clazz.instantialize (this, arguments);\r
-}, JU, "GZIPHeader", null, Cloneable);\r
-Clazz.defineMethod (c$, "setModifiedTime", \r
-function (mtime) {\r
-this.mtime = mtime;\r
-}, "~N");\r
-Clazz.defineMethod (c$, "getModifiedTime", \r
-function () {\r
-return this.mtime;\r
-});\r
-Clazz.defineMethod (c$, "setOS", \r
-function (os) {\r
-if ((0 <= os && os <= 13) || os == 255) this.os = os;\r
- else throw  new IllegalArgumentException ("os: " + os);\r
-}, "~N");\r
-Clazz.defineMethod (c$, "getOS", \r
-function () {\r
-return this.os;\r
-});\r
-Clazz.defineMethod (c$, "setName", \r
-function (name) {\r
-this.name = JU.ZStream.getBytes (name);\r
-}, "~S");\r
-Clazz.defineMethod (c$, "getName", \r
-function () {\r
-if (this.name == null) return "";\r
-try {\r
-return  String.instantialize (this.name, "ISO-8859-1");\r
-} catch (e) {\r
-if (Clazz.exceptionOf (e, java.io.UnsupportedEncodingException)) {\r
-throw  new InternalError (e.toString ());\r
-} else {\r
-throw e;\r
-}\r
-}\r
-});\r
-Clazz.defineMethod (c$, "setComment", \r
-function (comment) {\r
-this.comment = JU.ZStream.getBytes (comment);\r
-}, "~S");\r
-Clazz.defineMethod (c$, "getComment", \r
-function () {\r
-if (this.comment == null) return "";\r
-try {\r
-return  String.instantialize (this.comment, "ISO-8859-1");\r
-} catch (e) {\r
-if (Clazz.exceptionOf (e, java.io.UnsupportedEncodingException)) {\r
-throw  new InternalError (e.toString ());\r
-} else {\r
-throw e;\r
-}\r
-}\r
-});\r
-Clazz.defineMethod (c$, "setCRC", \r
-function (crc) {\r
-this.crc = crc;\r
-}, "~N");\r
-Clazz.defineMethod (c$, "getCRC", \r
-function () {\r
-return this.crc;\r
-});\r
-Clazz.defineMethod (c$, "put", \r
-function (d) {\r
-var flag = 0;\r
-if (this.text) {\r
-flag |= 1;\r
-}if (this.fhcrc) {\r
-flag |= 2;\r
-}if (this.extra != null) {\r
-flag |= 4;\r
-}if (this.name != null) {\r
-flag |= 8;\r
-}if (this.comment != null) {\r
-flag |= 16;\r
-}var xfl = 0;\r
-if (d.level == 1) {\r
-xfl |= 4;\r
-} else if (d.level == 9) {\r
-xfl |= 2;\r
-}d.put_short (0x8b1f);\r
-d.put_byteB (8);\r
-d.put_byteB (flag);\r
-d.put_byteB (this.mtime);\r
-d.put_byteB ((this.mtime >> 8));\r
-d.put_byteB ((this.mtime >> 16));\r
-d.put_byteB ((this.mtime >> 24));\r
-d.put_byteB (xfl);\r
-d.put_byteB (this.os);\r
-if (this.extra != null) {\r
-d.put_byteB (this.extra.length);\r
-d.put_byteB ((this.extra.length >> 8));\r
-d.put_byte (this.extra, 0, this.extra.length);\r
-}if (this.name != null) {\r
-d.put_byte (this.name, 0, this.name.length);\r
-d.put_byteB (0);\r
-}if (this.comment != null) {\r
-d.put_byte (this.comment, 0, this.comment.length);\r
-d.put_byteB (0);\r
-}}, "JU.Deflate");\r
-Clazz.defineMethod (c$, "clone", \r
-function () {\r
-var gheader = Clazz.superCall (this, JU.GZIPHeader, "clone", []);\r
-var tmp;\r
-if (gheader.extra != null) {\r
-tmp =  Clazz.newByteArray (gheader.extra.length, 0);\r
-System.arraycopy (gheader.extra, 0, tmp, 0, tmp.length);\r
-gheader.extra = tmp;\r
-}if (gheader.name != null) {\r
-tmp =  Clazz.newByteArray (gheader.name.length, 0);\r
-System.arraycopy (gheader.name, 0, tmp, 0, tmp.length);\r
-gheader.name = tmp;\r
-}if (gheader.comment != null) {\r
-tmp =  Clazz.newByteArray (gheader.comment.length, 0);\r
-System.arraycopy (gheader.comment, 0, tmp, 0, tmp.length);\r
-gheader.comment = tmp;\r
-}return gheader;\r
-});\r
-Clazz.defineStatics (c$,\r
-"OS_MSDOS", 0x00,\r
-"OS_AMIGA", 0x01,\r
-"OS_VMS", 0x02,\r
-"OS_UNIX", 0x03,\r
-"OS_ATARI", 0x05,\r
-"OS_OS2", 0x06,\r
-"OS_MACOS", 0x07,\r
-"OS_TOPS20", 0x0a,\r
-"OS_WIN32", 0x0b,\r
-"OS_VMCMS", 0x04,\r
-"OS_ZSYSTEM", 0x08,\r
-"OS_CPM", 0x09,\r
-"OS_QDOS", 0x0c,\r
-"OS_RISCOS", 0x0d,\r
-"OS_UNKNOWN", 0xff);\r
-});\r
+Clazz.declarePackage ("JU");
+Clazz.load (null, "JU.GZIPHeader", ["JU.ZStream", "java.lang.IllegalArgumentException", "$.InternalError"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.text = false;
+this.fhcrc = false;
+this.time = 0;
+this.xflags = 0;
+this.os = 255;
+this.extra = null;
+this.name = null;
+this.comment = null;
+this.hcrc = 0;
+this.crc = 0;
+this.done = false;
+this.mtime = 0;
+Clazz.instantialize (this, arguments);
+}, JU, "GZIPHeader", null, Cloneable);
+Clazz.defineMethod (c$, "setModifiedTime", 
+function (mtime) {
+this.mtime = mtime;
+}, "~N");
+Clazz.defineMethod (c$, "getModifiedTime", 
+function () {
+return this.mtime;
+});
+Clazz.defineMethod (c$, "setOS", 
+function (os) {
+if ((0 <= os && os <= 13) || os == 255) this.os = os;
+ else throw  new IllegalArgumentException ("os: " + os);
+}, "~N");
+Clazz.defineMethod (c$, "getOS", 
+function () {
+return this.os;
+});
+Clazz.defineMethod (c$, "setName", 
+function (name) {
+this.name = JU.ZStream.getBytes (name);
+}, "~S");
+Clazz.defineMethod (c$, "getName", 
+function () {
+if (this.name == null) return "";
+try {
+return  String.instantialize (this.name, "ISO-8859-1");
+} catch (e) {
+if (Clazz.exceptionOf (e, java.io.UnsupportedEncodingException)) {
+throw  new InternalError (e.toString ());
+} else {
+throw e;
+}
+}
+});
+Clazz.defineMethod (c$, "setComment", 
+function (comment) {
+this.comment = JU.ZStream.getBytes (comment);
+}, "~S");
+Clazz.defineMethod (c$, "getComment", 
+function () {
+if (this.comment == null) return "";
+try {
+return  String.instantialize (this.comment, "ISO-8859-1");
+} catch (e) {
+if (Clazz.exceptionOf (e, java.io.UnsupportedEncodingException)) {
+throw  new InternalError (e.toString ());
+} else {
+throw e;
+}
+}
+});
+Clazz.defineMethod (c$, "setCRC", 
+function (crc) {
+this.crc = crc;
+}, "~N");
+Clazz.defineMethod (c$, "getCRC", 
+function () {
+return this.crc;
+});
+Clazz.defineMethod (c$, "put", 
+function (d) {
+var flag = 0;
+if (this.text) {
+flag |= 1;
+}if (this.fhcrc) {
+flag |= 2;
+}if (this.extra != null) {
+flag |= 4;
+}if (this.name != null) {
+flag |= 8;
+}if (this.comment != null) {
+flag |= 16;
+}var xfl = 0;
+if (d.level == 1) {
+xfl |= 4;
+} else if (d.level == 9) {
+xfl |= 2;
+}d.put_short (0x8b1f);
+d.put_byteB (8);
+d.put_byteB (flag);
+d.put_byteB (this.mtime);
+d.put_byteB ((this.mtime >> 8));
+d.put_byteB ((this.mtime >> 16));
+d.put_byteB ((this.mtime >> 24));
+d.put_byteB (xfl);
+d.put_byteB (this.os);
+if (this.extra != null) {
+d.put_byteB (this.extra.length);
+d.put_byteB ((this.extra.length >> 8));
+d.put_byte (this.extra, 0, this.extra.length);
+}if (this.name != null) {
+d.put_byte (this.name, 0, this.name.length);
+d.put_byteB (0);
+}if (this.comment != null) {
+d.put_byte (this.comment, 0, this.comment.length);
+d.put_byteB (0);
+}}, "JU.Deflate");
+Clazz.defineMethod (c$, "clone", 
+function () {
+var gheader = Clazz.superCall (this, JU.GZIPHeader, "clone", []);
+var tmp;
+if (gheader.extra != null) {
+tmp =  Clazz.newByteArray (gheader.extra.length, 0);
+System.arraycopy (gheader.extra, 0, tmp, 0, tmp.length);
+gheader.extra = tmp;
+}if (gheader.name != null) {
+tmp =  Clazz.newByteArray (gheader.name.length, 0);
+System.arraycopy (gheader.name, 0, tmp, 0, tmp.length);
+gheader.name = tmp;
+}if (gheader.comment != null) {
+tmp =  Clazz.newByteArray (gheader.comment.length, 0);
+System.arraycopy (gheader.comment, 0, tmp, 0, tmp.length);
+gheader.comment = tmp;
+}return gheader;
+});
+Clazz.defineStatics (c$,
+"OS_MSDOS", 0x00,
+"OS_AMIGA", 0x01,
+"OS_VMS", 0x02,
+"OS_UNIX", 0x03,
+"OS_ATARI", 0x05,
+"OS_OS2", 0x06,
+"OS_MACOS", 0x07,
+"OS_TOPS20", 0x0a,
+"OS_WIN32", 0x0b,
+"OS_VMCMS", 0x04,
+"OS_ZSYSTEM", 0x08,
+"OS_CPM", 0x09,
+"OS_QDOS", 0x0c,
+"OS_RISCOS", 0x0d,
+"OS_UNKNOWN", 0xff);
+});