X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=bin%2Fjavajs%2Futil%2FCompoundDocDirEntry.js;h=5c3ab4393b94f1192e9b2e338669b10564c5241b;hp=d792190e0ed73976d5ab4ea026422659c762c457;hb=8ffd05b3abe52c0b6b79b011c0966361f82d5fe6;hpb=6154cb57a6eac3bb1344b8342495f5bb701ee921 diff --git a/bin/javajs/util/CompoundDocDirEntry.js b/bin/javajs/util/CompoundDocDirEntry.js index d792190..5c3ab43 100644 --- a/bin/javajs/util/CompoundDocDirEntry.js +++ b/bin/javajs/util/CompoundDocDirEntry.js @@ -1,58 +1,58 @@ -Clazz.declarePackage ("javajs.util"); -c$ = Clazz.decorateAsClass (function () { -this.cd = null; -this.unicodeName64 = null; -this.nBytesUnicodeName = 0; -this.entryType = 0; -this.uniqueID16 = null; -this.userflags4 = null; -this.SIDfirstSector = 0; -this.lenStream = 0; -this.unused = null; -this.entryName = null; -this.isStandard = false; -this.isEmpty = false; -Clazz.instantialize (this, arguments); -}, javajs.util, "CompoundDocDirEntry"); -Clazz.prepareFields (c$, function () { -this.unicodeName64 = Clazz.newByteArray (64, 0); -this.uniqueID16 = Clazz.newByteArray (16, 0); -this.userflags4 = Clazz.newByteArray (4, 0); -this.unused = Clazz.newByteArray (8, 0); -}); -Clazz.makeConstructor (c$, -function (compoundDocument) { -this.cd = compoundDocument; -}, "javajs.util.CompoundDocument"); -Clazz.defineMethod (c$, "readData", -function () { -try { -this.cd.readByteArray (this.unicodeName64, 0, 64); -this.nBytesUnicodeName = this.cd.readShort (); -this.entryType = this.cd.readByte (); -this.cd.readByte (); -this.cd.readInt (); -this.cd.readInt (); -this.cd.readInt (); -this.cd.readByteArray (this.uniqueID16, 0, 16); -this.cd.readByteArray (this.userflags4, 0, 4); -this.cd.readByteArray (this.unused, 0, 8); -this.cd.readByteArray (this.unused, 0, 8); -this.SIDfirstSector = this.cd.readInt (); -this.lenStream = this.cd.readInt (); -this.cd.readByteArray (this.unused, 0, 4); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -System.out.println (e.toString ()); -return false; -} else { -throw e; -} -} -this.entryName = ""; -for (var i = 0; i < this.nBytesUnicodeName - 2; i += 2) this.entryName += String.fromCharCode (this.unicodeName64[i]); - -this.isStandard = (this.entryType == 5 || this.lenStream >= this.cd.header.minBytesStandardStream); -this.isEmpty = (this.entryType == 0 || this.lenStream <= 0); -return true; -}); +Clazz.declarePackage ("javajs.util"); +c$ = Clazz.decorateAsClass (function () { +this.cd = null; +this.unicodeName64 = null; +this.nBytesUnicodeName = 0; +this.entryType = 0; +this.uniqueID16 = null; +this.userflags4 = null; +this.SIDfirstSector = 0; +this.lenStream = 0; +this.unused = null; +this.entryName = null; +this.isStandard = false; +this.isEmpty = false; +Clazz.instantialize (this, arguments); +}, javajs.util, "CompoundDocDirEntry"); +Clazz.prepareFields (c$, function () { +this.unicodeName64 = Clazz.newByteArray (64, 0); +this.uniqueID16 = Clazz.newByteArray (16, 0); +this.userflags4 = Clazz.newByteArray (4, 0); +this.unused = Clazz.newByteArray (8, 0); +}); +Clazz.makeConstructor (c$, +function (compoundDocument) { +this.cd = compoundDocument; +}, "javajs.util.CompoundDocument"); +Clazz.defineMethod (c$, "readData", +function () { +try { +this.cd.readByteArray (this.unicodeName64, 0, 64); +this.nBytesUnicodeName = this.cd.readShort (); +this.entryType = this.cd.readByte (); +this.cd.readByte (); +this.cd.readInt (); +this.cd.readInt (); +this.cd.readInt (); +this.cd.readByteArray (this.uniqueID16, 0, 16); +this.cd.readByteArray (this.userflags4, 0, 4); +this.cd.readByteArray (this.unused, 0, 8); +this.cd.readByteArray (this.unused, 0, 8); +this.SIDfirstSector = this.cd.readInt (); +this.lenStream = this.cd.readInt (); +this.cd.readByteArray (this.unused, 0, 4); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +System.out.println (e.toString ()); +return false; +} else { +throw e; +} +} +this.entryName = ""; +for (var i = 0; i < this.nBytesUnicodeName - 2; i += 2) this.entryName += String.fromCharCode (this.unicodeName64[i]); + +this.isStandard = (this.entryType == 5 || this.lenStream >= this.cd.header.minBytesStandardStream); +this.isEmpty = (this.entryType == 0 || this.lenStream <= 0); +return true; +});