JAL-1807 still testing
[jalviewjs.git] / bin / javajs / util / CompoundDocument.js
index a37c69e..7e480bc 100644 (file)
-Clazz.declarePackage ("javajs.util");
-Clazz.load (["javajs.util.BinaryDocument", "$.CompoundDocHeader", "$.Lst"], "javajs.util.CompoundDocument", ["java.io.DataInputStream", "javajs.util.CompoundDocDirEntry", "$.SB", "$.ZipData"], function () {
-c$ = Clazz.decorateAsClass (function () {
-this.header = null;
-this.directory = null;
-this.rootEntry = null;
-this.SAT = null;
-this.SSAT = null;
-this.sectorSize = 0;
-this.shortSectorSize = 0;
-this.nShortSectorsPerStandardSector = 0;
-this.nIntPerSector = 0;
-this.nDirEntriesperSector = 0;
-this.data = null;
-Clazz.instantialize (this, arguments);
-}, javajs.util, "CompoundDocument", javajs.util.BinaryDocument);
-Clazz.prepareFields (c$, function () {
-this.header =  new javajs.util.CompoundDocHeader (this);
-this.directory =  new javajs.util.Lst ();
-});
-Clazz.makeConstructor (c$, 
-function () {
-Clazz.superConstructor (this, javajs.util.CompoundDocument);
-this.isBigEndian = true;
-});
-Clazz.overrideMethod (c$, "setStream", 
-function (jzt, bis, isBigEndian) {
-this.jzt = jzt;
-if (!this.isRandom) {
-this.stream =  new java.io.DataInputStream (bis);
-}this.stream.mark (2147483647);
-if (!this.readHeader ()) return;
-this.getSectorAllocationTable ();
-this.getShortSectorAllocationTable ();
-this.getDirectoryTable ();
-}, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~B");
-Clazz.defineMethod (c$, "getDirectory", 
-function () {
-return this.directory;
-});
-Clazz.defineMethod (c$, "getDirectoryListing", 
-function (separator) {
-var str = "";
-for (var i = 0; i < this.directory.size (); i++) {
-var thisEntry = this.directory.get (i);
-if (!thisEntry.isEmpty) str += separator + thisEntry.entryName + "\tlen=" + thisEntry.lenStream + "\tSID=" + thisEntry.SIDfirstSector + (thisEntry.isStandard ? "\tfileOffset=" + this.getOffset (thisEntry.SIDfirstSector) : "");
-}
-return str;
-}, "~S");
-Clazz.defineMethod (c$, "getAllData", 
-function () {
-return this.getAllDataFiles (null, null);
-});
-Clazz.overrideMethod (c$, "getAllDataMapped", 
-function (prefix, binaryFileList, fileData) {
-fileData.put ("#Directory_Listing", this.getDirectoryListing ("|"));
-binaryFileList = "|" + binaryFileList + "|";
-for (var i = 0; i < this.directory.size (); i++) {
-var thisEntry = this.directory.get (i);
-if (!thisEntry.isEmpty && thisEntry.entryType != 5) {
-var name = thisEntry.entryName;
-System.out.println ("CompoundDocument file " + name);
-var isBinary = (binaryFileList.indexOf ("|" + name + "|") >= 0);
-if (isBinary) name += ":asBinaryString";
-var data =  new javajs.util.SB ();
-data.append ("BEGIN Directory Entry ").append (name).append ("\n");
-data.appendSB (this.getEntryAsString (thisEntry, isBinary));
-data.append ("\nEND Directory Entry ").append (name).append ("\n");
-fileData.put (prefix + "/" + name, data.toString ());
-}}
-this.close ();
-}, "~S,~S,java.util.Map");
-Clazz.overrideMethod (c$, "getAllDataFiles", 
-function (binaryFileList, firstFile) {
-if (firstFile != null) {
-for (var i = 0; i < this.directory.size (); i++) {
-var thisEntry = this.directory.get (i);
-if (thisEntry.entryName.equals (firstFile)) {
-this.directory.remove (i);
-this.directory.add (1, thisEntry);
-break;
-}}
-}this.data =  new javajs.util.SB ();
-this.data.append ("Compound Document File Directory: ");
-this.data.append (this.getDirectoryListing ("|"));
-this.data.append ("\n");
-binaryFileList = "|" + binaryFileList + "|";
-for (var i = 0; i < this.directory.size (); i++) {
-var thisEntry = this.directory.get (i);
-if (!thisEntry.isEmpty && thisEntry.entryType != 5) {
-var name = thisEntry.entryName;
-if (name.endsWith (".gz")) name = name.substring (0, name.length - 3);
-this.data.append ("BEGIN Directory Entry ").append (name).append ("\n");
-this.data.appendSB (this.getEntryAsString (thisEntry, binaryFileList.indexOf ("|" + thisEntry.entryName + "|") >= 0));
-this.data.append ("\n");
-this.data.append ("END Directory Entry ").append (thisEntry.entryName).append ("\n");
-}}
-this.close ();
-return this.data;
-}, "~S,~S");
-Clazz.defineMethod (c$, "getFileAsString", 
-function (entryName) {
-for (var i = 0; i < this.directory.size (); i++) {
-var thisEntry = this.directory.get (i);
-if (thisEntry.entryName.equals (entryName)) return this.getEntryAsString (thisEntry, false);
-}
-return  new javajs.util.SB ();
-}, "~S");
-Clazz.defineMethod (c$, "getOffset", 
-($fz = function (SID) {
-return (SID + 1) * this.sectorSize;
-}, $fz.isPrivate = true, $fz), "~N");
-Clazz.defineMethod (c$, "gotoSector", 
-($fz = function (SID) {
-this.seek (this.getOffset (SID));
-}, $fz.isPrivate = true, $fz), "~N");
-Clazz.defineMethod (c$, "readHeader", 
-($fz = function () {
-if (!this.header.readData ()) return false;
-this.sectorSize = 1 << this.header.sectorPower;
-this.shortSectorSize = 1 << this.header.shortSectorPower;
-this.nShortSectorsPerStandardSector = Clazz.doubleToInt (this.sectorSize / this.shortSectorSize);
-this.nIntPerSector = Clazz.doubleToInt (this.sectorSize / 4);
-this.nDirEntriesperSector = Clazz.doubleToInt (this.sectorSize / 128);
-return true;
-}, $fz.isPrivate = true, $fz));
-Clazz.defineMethod (c$, "getSectorAllocationTable", 
-($fz = function () {
-var nSID = 0;
-var thisSID;
-this.SAT =  Clazz.newIntArray (this.header.nSATsectors * this.nIntPerSector + 109, 0);
-try {
-for (var i = 0; i < 109; i++) {
-thisSID = this.header.MSAT0[i];
-if (thisSID < 0) break;
-this.gotoSector (thisSID);
-for (var j = 0; j < this.nIntPerSector; j++) {
-this.SAT[nSID++] = this.readInt ();
-}
-}
-var nMaster = this.header.nAdditionalMATsectors;
-thisSID = this.header.SID_MSAT_next;
-var MSAT =  Clazz.newIntArray (this.nIntPerSector, 0);
-out : while (nMaster-- > 0 && thisSID >= 0) {
-this.gotoSector (thisSID);
-for (var i = 0; i < this.nIntPerSector; i++) MSAT[i] = this.readInt ();
-
-for (var i = 0; i < this.nIntPerSector - 1; i++) {
-thisSID = MSAT[i];
-if (thisSID < 0) break out;
-this.gotoSector (thisSID);
-for (var j = this.nIntPerSector; --j >= 0; ) this.SAT[nSID++] = this.readInt ();
-
-}
-thisSID = MSAT[this.nIntPerSector - 1];
-}
-} catch (e) {
-if (Clazz.exceptionOf (e, Exception)) {
-System.out.println (e.toString ());
-} else {
-throw e;
-}
-}
-}, $fz.isPrivate = true, $fz));
-Clazz.defineMethod (c$, "getShortSectorAllocationTable", 
-($fz = function () {
-var nSSID = 0;
-var thisSID = this.header.SID_SSAT_start;
-var nMax = this.header.nSSATsectors * this.nIntPerSector;
-this.SSAT =  Clazz.newIntArray (nMax, 0);
-try {
-while (thisSID > 0 && nSSID < nMax) {
-this.gotoSector (thisSID);
-for (var j = 0; j < this.nIntPerSector; j++) {
-this.SSAT[nSSID++] = this.readInt ();
-}
-thisSID = this.SAT[thisSID];
-}
-} catch (e) {
-if (Clazz.exceptionOf (e, Exception)) {
-System.out.println (e.toString ());
-} else {
-throw e;
-}
-}
-}, $fz.isPrivate = true, $fz));
-Clazz.defineMethod (c$, "getDirectoryTable", 
-($fz = function () {
-var thisSID = this.header.SID_DIR_start;
-var thisEntry;
-this.rootEntry = null;
-try {
-while (thisSID > 0) {
-this.gotoSector (thisSID);
-for (var j = this.nDirEntriesperSector; --j >= 0; ) {
-thisEntry =  new javajs.util.CompoundDocDirEntry (this);
-thisEntry.readData ();
-if (thisEntry.lenStream > 0) {
-this.directory.addLast (thisEntry);
-}if (thisEntry.entryType == 5) this.rootEntry = thisEntry;
-}
-thisSID = this.SAT[thisSID];
-}
-} catch (e) {
-if (Clazz.exceptionOf (e, Exception)) {
-System.out.println (e.toString ());
-} else {
-throw e;
-}
-}
-}, $fz.isPrivate = true, $fz));
-Clazz.defineMethod (c$, "getEntryAsString", 
-($fz = function (thisEntry, asBinaryString) {
-if (thisEntry.isEmpty) return  new javajs.util.SB ();
-return (thisEntry.isStandard ? this.getStandardStringData (thisEntry.SIDfirstSector, thisEntry.lenStream, asBinaryString) : this.getShortStringData (thisEntry.SIDfirstSector, thisEntry.lenStream, asBinaryString));
-}, $fz.isPrivate = true, $fz), "javajs.util.CompoundDocDirEntry,~B");
-Clazz.defineMethod (c$, "getStandardStringData", 
-($fz = function (thisSID, nBytes, asBinaryString) {
-var data =  new javajs.util.SB ();
-var byteBuf =  Clazz.newByteArray (this.sectorSize, 0);
-var gzipData =  new javajs.util.ZipData (nBytes);
-try {
-while (thisSID > 0 && nBytes > 0) {
-this.gotoSector (thisSID);
-nBytes = this.getSectorData (data, byteBuf, this.sectorSize, nBytes, asBinaryString, gzipData);
-thisSID = this.SAT[thisSID];
-}
-if (nBytes == -9999) return  new javajs.util.SB ();
-} catch (e) {
-if (Clazz.exceptionOf (e, Exception)) {
-System.out.println (e.toString ());
-} else {
-throw e;
-}
-}
-if (gzipData.isEnabled) gzipData.addTo (this.jzt, data);
-return data;
-}, $fz.isPrivate = true, $fz), "~N,~N,~B");
-Clazz.defineMethod (c$, "getSectorData", 
-($fz = function (data, byteBuf, nSectorBytes, nBytes, asBinaryString, gzipData) {
-this.readByteArray (byteBuf, 0, byteBuf.length);
-var n = gzipData.addBytes (byteBuf, nSectorBytes, nBytes);
-if (n >= 0) return n;
-if (asBinaryString) {
-for (var i = 0; i < nSectorBytes; i++) {
-data.append (Integer.toHexString (byteBuf[i] & 0xFF)).appendC (' ');
-if (--nBytes < 1) break;
-}
-} else {
-for (var i = 0; i < nSectorBytes; i++) {
-if (byteBuf[i] == 0) return -9999;
-data.appendC (String.fromCharCode (byteBuf[i]));
-if (--nBytes < 1) break;
-}
-}return nBytes;
-}, $fz.isPrivate = true, $fz), "javajs.util.SB,~A,~N,~N,~B,javajs.util.ZipData");
-Clazz.defineMethod (c$, "getShortStringData", 
-($fz = function (shortSID, nBytes, asBinaryString) {
-var data =  new javajs.util.SB ();
-if (this.rootEntry == null) return data;
-var thisSID = this.rootEntry.SIDfirstSector;
-var ptShort = 0;
-var byteBuf =  Clazz.newByteArray (this.shortSectorSize, 0);
-var gzipData =  new javajs.util.ZipData (nBytes);
-try {
-while (thisSID >= 0 && shortSID >= 0 && nBytes > 0) {
-while (shortSID - ptShort >= this.nShortSectorsPerStandardSector) {
-ptShort += this.nShortSectorsPerStandardSector;
-thisSID = this.SAT[thisSID];
-}
-this.seek (this.getOffset (thisSID) + (shortSID - ptShort) * this.shortSectorSize);
-nBytes = this.getSectorData (data, byteBuf, this.shortSectorSize, nBytes, asBinaryString, gzipData);
-shortSID = this.SSAT[shortSID];
-}
-} catch (e) {
-if (Clazz.exceptionOf (e, Exception)) {
-System.out.println (data.toString ());
-System.out.println ("reader error in CompoundDocument " + e.toString ());
-} else {
-throw e;
-}
-}
-if (gzipData.isEnabled) gzipData.addTo (this.jzt, data);
-return data;
-}, $fz.isPrivate = true, $fz), "~N,~N,~B");
-});
+Clazz.declarePackage ("javajs.util");\r
+Clazz.load (["javajs.util.BinaryDocument", "$.CompoundDocHeader", "$.Lst"], "javajs.util.CompoundDocument", ["java.io.DataInputStream", "javajs.util.CompoundDocDirEntry", "$.SB", "$.ZipData"], function () {\r
+c$ = Clazz.decorateAsClass (function () {\r
+this.header = null;\r
+this.directory = null;\r
+this.rootEntry = null;\r
+this.SAT = null;\r
+this.SSAT = null;\r
+this.sectorSize = 0;\r
+this.shortSectorSize = 0;\r
+this.nShortSectorsPerStandardSector = 0;\r
+this.nIntPerSector = 0;\r
+this.nDirEntriesperSector = 0;\r
+this.data = null;\r
+Clazz.instantialize (this, arguments);\r
+}, javajs.util, "CompoundDocument", javajs.util.BinaryDocument);\r
+Clazz.prepareFields (c$, function () {\r
+this.header =  new javajs.util.CompoundDocHeader (this);\r
+this.directory =  new javajs.util.Lst ();\r
+});\r
+Clazz.makeConstructor (c$, \r
+function () {\r
+Clazz.superConstructor (this, javajs.util.CompoundDocument);\r
+this.isBigEndian = true;\r
+});\r
+Clazz.overrideMethod (c$, "setStream", \r
+function (jzt, bis, isBigEndian) {\r
+this.jzt = jzt;\r
+if (!this.isRandom) {\r
+this.stream =  new java.io.DataInputStream (bis);\r
+}this.stream.mark (2147483647);\r
+if (!this.readHeader ()) return;\r
+this.getSectorAllocationTable ();\r
+this.getShortSectorAllocationTable ();\r
+this.getDirectoryTable ();\r
+}, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~B");\r
+Clazz.defineMethod (c$, "getDirectory", \r
+function () {\r
+return this.directory;\r
+});\r
+Clazz.defineMethod (c$, "getDirectoryListing", \r
+function (separator) {\r
+var str = "";\r
+for (var i = 0; i < this.directory.size (); i++) {\r
+var thisEntry = this.directory.get (i);\r
+if (!thisEntry.isEmpty) str += separator + thisEntry.entryName + "\tlen=" + thisEntry.lenStream + "\tSID=" + thisEntry.SIDfirstSector + (thisEntry.isStandard ? "\tfileOffset=" + this.getOffset (thisEntry.SIDfirstSector) : "");\r
+}\r
+return str;\r
+}, "~S");\r
+Clazz.defineMethod (c$, "getAllData", \r
+function () {\r
+return this.getAllDataFiles (null, null);\r
+});\r
+Clazz.overrideMethod (c$, "getAllDataMapped", \r
+function (prefix, binaryFileList, fileData) {\r
+fileData.put ("#Directory_Listing", this.getDirectoryListing ("|"));\r
+binaryFileList = "|" + binaryFileList + "|";\r
+for (var i = 0; i < this.directory.size (); i++) {\r
+var thisEntry = this.directory.get (i);\r
+if (!thisEntry.isEmpty && thisEntry.entryType != 5) {\r
+var name = thisEntry.entryName;\r
+System.out.println ("CompoundDocument file " + name);\r
+var isBinary = (binaryFileList.indexOf ("|" + name + "|") >= 0);\r
+if (isBinary) name += ":asBinaryString";\r
+var data =  new javajs.util.SB ();\r
+data.append ("BEGIN Directory Entry ").append (name).append ("\n");\r
+data.appendSB (this.getEntryAsString (thisEntry, isBinary));\r
+data.append ("\nEND Directory Entry ").append (name).append ("\n");\r
+fileData.put (prefix + "/" + name, data.toString ());\r
+}}\r
+this.close ();\r
+}, "~S,~S,java.util.Map");\r
+Clazz.overrideMethod (c$, "getAllDataFiles", \r
+function (binaryFileList, firstFile) {\r
+if (firstFile != null) {\r
+for (var i = 0; i < this.directory.size (); i++) {\r
+var thisEntry = this.directory.get (i);\r
+if (thisEntry.entryName.equals (firstFile)) {\r
+this.directory.remove (i);\r
+this.directory.add (1, thisEntry);\r
+break;\r
+}}\r
+}this.data =  new javajs.util.SB ();\r
+this.data.append ("Compound Document File Directory: ");\r
+this.data.append (this.getDirectoryListing ("|"));\r
+this.data.append ("\n");\r
+binaryFileList = "|" + binaryFileList + "|";\r
+for (var i = 0; i < this.directory.size (); i++) {\r
+var thisEntry = this.directory.get (i);\r
+if (!thisEntry.isEmpty && thisEntry.entryType != 5) {\r
+var name = thisEntry.entryName;\r
+if (name.endsWith (".gz")) name = name.substring (0, name.length - 3);\r
+this.data.append ("BEGIN Directory Entry ").append (name).append ("\n");\r
+this.data.appendSB (this.getEntryAsString (thisEntry, binaryFileList.indexOf ("|" + thisEntry.entryName + "|") >= 0));\r
+this.data.append ("\n");\r
+this.data.append ("END Directory Entry ").append (thisEntry.entryName).append ("\n");\r
+}}\r
+this.close ();\r
+return this.data;\r
+}, "~S,~S");\r
+Clazz.defineMethod (c$, "getFileAsString", \r
+function (entryName) {\r
+for (var i = 0; i < this.directory.size (); i++) {\r
+var thisEntry = this.directory.get (i);\r
+if (thisEntry.entryName.equals (entryName)) return this.getEntryAsString (thisEntry, false);\r
+}\r
+return  new javajs.util.SB ();\r
+}, "~S");\r
+Clazz.defineMethod (c$, "getOffset", \r
+($fz = function (SID) {\r
+return (SID + 1) * this.sectorSize;\r
+}, $fz.isPrivate = true, $fz), "~N");\r
+Clazz.defineMethod (c$, "gotoSector", \r
+($fz = function (SID) {\r
+this.seek (this.getOffset (SID));\r
+}, $fz.isPrivate = true, $fz), "~N");\r
+Clazz.defineMethod (c$, "readHeader", \r
+($fz = function () {\r
+if (!this.header.readData ()) return false;\r
+this.sectorSize = 1 << this.header.sectorPower;\r
+this.shortSectorSize = 1 << this.header.shortSectorPower;\r
+this.nShortSectorsPerStandardSector = Clazz.doubleToInt (this.sectorSize / this.shortSectorSize);\r
+this.nIntPerSector = Clazz.doubleToInt (this.sectorSize / 4);\r
+this.nDirEntriesperSector = Clazz.doubleToInt (this.sectorSize / 128);\r
+return true;\r
+}, $fz.isPrivate = true, $fz));\r
+Clazz.defineMethod (c$, "getSectorAllocationTable", \r
+($fz = function () {\r
+var nSID = 0;\r
+var thisSID;\r
+this.SAT =  Clazz.newIntArray (this.header.nSATsectors * this.nIntPerSector + 109, 0);\r
+try {\r
+for (var i = 0; i < 109; i++) {\r
+thisSID = this.header.MSAT0[i];\r
+if (thisSID < 0) break;\r
+this.gotoSector (thisSID);\r
+for (var j = 0; j < this.nIntPerSector; j++) {\r
+this.SAT[nSID++] = this.readInt ();\r
+}\r
+}\r
+var nMaster = this.header.nAdditionalMATsectors;\r
+thisSID = this.header.SID_MSAT_next;\r
+var MSAT =  Clazz.newIntArray (this.nIntPerSector, 0);\r
+out : while (nMaster-- > 0 && thisSID >= 0) {\r
+this.gotoSector (thisSID);\r
+for (var i = 0; i < this.nIntPerSector; i++) MSAT[i] = this.readInt ();\r
+\r
+for (var i = 0; i < this.nIntPerSector - 1; i++) {\r
+thisSID = MSAT[i];\r
+if (thisSID < 0) break out;\r
+this.gotoSector (thisSID);\r
+for (var j = this.nIntPerSector; --j >= 0; ) this.SAT[nSID++] = this.readInt ();\r
+\r
+}\r
+thisSID = MSAT[this.nIntPerSector - 1];\r
+}\r
+} catch (e) {\r
+if (Clazz.exceptionOf (e, Exception)) {\r
+System.out.println (e.toString ());\r
+} else {\r
+throw e;\r
+}\r
+}\r
+}, $fz.isPrivate = true, $fz));\r
+Clazz.defineMethod (c$, "getShortSectorAllocationTable", \r
+($fz = function () {\r
+var nSSID = 0;\r
+var thisSID = this.header.SID_SSAT_start;\r
+var nMax = this.header.nSSATsectors * this.nIntPerSector;\r
+this.SSAT =  Clazz.newIntArray (nMax, 0);\r
+try {\r
+while (thisSID > 0 && nSSID < nMax) {\r
+this.gotoSector (thisSID);\r
+for (var j = 0; j < this.nIntPerSector; j++) {\r
+this.SSAT[nSSID++] = this.readInt ();\r
+}\r
+thisSID = this.SAT[thisSID];\r
+}\r
+} catch (e) {\r
+if (Clazz.exceptionOf (e, Exception)) {\r
+System.out.println (e.toString ());\r
+} else {\r
+throw e;\r
+}\r
+}\r
+}, $fz.isPrivate = true, $fz));\r
+Clazz.defineMethod (c$, "getDirectoryTable", \r
+($fz = function () {\r
+var thisSID = this.header.SID_DIR_start;\r
+var thisEntry;\r
+this.rootEntry = null;\r
+try {\r
+while (thisSID > 0) {\r
+this.gotoSector (thisSID);\r
+for (var j = this.nDirEntriesperSector; --j >= 0; ) {\r
+thisEntry =  new javajs.util.CompoundDocDirEntry (this);\r
+thisEntry.readData ();\r
+if (thisEntry.lenStream > 0) {\r
+this.directory.addLast (thisEntry);\r
+}if (thisEntry.entryType == 5) this.rootEntry = thisEntry;\r
+}\r
+thisSID = this.SAT[thisSID];\r
+}\r
+} catch (e) {\r
+if (Clazz.exceptionOf (e, Exception)) {\r
+System.out.println (e.toString ());\r
+} else {\r
+throw e;\r
+}\r
+}\r
+}, $fz.isPrivate = true, $fz));\r
+Clazz.defineMethod (c$, "getEntryAsString", \r
+($fz = function (thisEntry, asBinaryString) {\r
+if (thisEntry.isEmpty) return  new javajs.util.SB ();\r
+return (thisEntry.isStandard ? this.getStandardStringData (thisEntry.SIDfirstSector, thisEntry.lenStream, asBinaryString) : this.getShortStringData (thisEntry.SIDfirstSector, thisEntry.lenStream, asBinaryString));\r
+}, $fz.isPrivate = true, $fz), "javajs.util.CompoundDocDirEntry,~B");\r
+Clazz.defineMethod (c$, "getStandardStringData", \r
+($fz = function (thisSID, nBytes, asBinaryString) {\r
+var data =  new javajs.util.SB ();\r
+var byteBuf =  Clazz.newByteArray (this.sectorSize, 0);\r
+var gzipData =  new javajs.util.ZipData (nBytes);\r
+try {\r
+while (thisSID > 0 && nBytes > 0) {\r
+this.gotoSector (thisSID);\r
+nBytes = this.getSectorData (data, byteBuf, this.sectorSize, nBytes, asBinaryString, gzipData);\r
+thisSID = this.SAT[thisSID];\r
+}\r
+if (nBytes == -9999) return  new javajs.util.SB ();\r
+} catch (e) {\r
+if (Clazz.exceptionOf (e, Exception)) {\r
+System.out.println (e.toString ());\r
+} else {\r
+throw e;\r
+}\r
+}\r
+if (gzipData.isEnabled) gzipData.addTo (this.jzt, data);\r
+return data;\r
+}, $fz.isPrivate = true, $fz), "~N,~N,~B");\r
+Clazz.defineMethod (c$, "getSectorData", \r
+($fz = function (data, byteBuf, nSectorBytes, nBytes, asBinaryString, gzipData) {\r
+this.readByteArray (byteBuf, 0, byteBuf.length);\r
+var n = gzipData.addBytes (byteBuf, nSectorBytes, nBytes);\r
+if (n >= 0) return n;\r
+if (asBinaryString) {\r
+for (var i = 0; i < nSectorBytes; i++) {\r
+data.append (Integer.toHexString (byteBuf[i] & 0xFF)).appendC (' ');\r
+if (--nBytes < 1) break;\r
+}\r
+} else {\r
+for (var i = 0; i < nSectorBytes; i++) {\r
+if (byteBuf[i] == 0) return -9999;\r
+data.appendC (String.fromCharCode (byteBuf[i]));\r
+if (--nBytes < 1) break;\r
+}\r
+}return nBytes;\r
+}, $fz.isPrivate = true, $fz), "javajs.util.SB,~A,~N,~N,~B,javajs.util.ZipData");\r
+Clazz.defineMethod (c$, "getShortStringData", \r
+($fz = function (shortSID, nBytes, asBinaryString) {\r
+var data =  new javajs.util.SB ();\r
+if (this.rootEntry == null) return data;\r
+var thisSID = this.rootEntry.SIDfirstSector;\r
+var ptShort = 0;\r
+var byteBuf =  Clazz.newByteArray (this.shortSectorSize, 0);\r
+var gzipData =  new javajs.util.ZipData (nBytes);\r
+try {\r
+while (thisSID >= 0 && shortSID >= 0 && nBytes > 0) {\r
+while (shortSID - ptShort >= this.nShortSectorsPerStandardSector) {\r
+ptShort += this.nShortSectorsPerStandardSector;\r
+thisSID = this.SAT[thisSID];\r
+}\r
+this.seek (this.getOffset (thisSID) + (shortSID - ptShort) * this.shortSectorSize);\r
+nBytes = this.getSectorData (data, byteBuf, this.shortSectorSize, nBytes, asBinaryString, gzipData);\r
+shortSID = this.SSAT[shortSID];\r
+}\r
+} catch (e) {\r
+if (Clazz.exceptionOf (e, Exception)) {\r
+System.out.println (data.toString ());\r
+System.out.println ("reader error in CompoundDocument " + e.toString ());\r
+} else {\r
+throw e;\r
+}\r
+}\r
+if (gzipData.isEnabled) gzipData.addTo (this.jzt, data);\r
+return data;\r
+}, $fz.isPrivate = true, $fz), "~N,~N,~B");\r
+});\r