1 Clazz.declarePackage ("JU");
2 c$ = Clazz.decorateAsClass (function () {
4 this.unicodeName64 = null;
5 this.nBytesUnicodeName = 0;
7 this.uniqueID16 = null;
8 this.userflags4 = null;
9 this.SIDfirstSector = 0;
12 this.entryName = null;
13 this.isStandard = false;
15 Clazz.instantialize (this, arguments);
16 }, JU, "CompoundDocDirEntry");
17 Clazz.prepareFields (c$, function () {
18 this.unicodeName64 = Clazz.newByteArray (64, 0);
19 this.uniqueID16 = Clazz.newByteArray (16, 0);
20 this.userflags4 = Clazz.newByteArray (4, 0);
21 this.unused = Clazz.newByteArray (8, 0);
23 Clazz.makeConstructor (c$,
24 function (compoundDocument) {
25 this.cd = compoundDocument;
26 }, "JU.CompoundDocument");
27 Clazz.defineMethod (c$, "readData",
30 this.cd.readByteArray (this.unicodeName64, 0, 64);
31 this.nBytesUnicodeName = this.cd.readShort ();
32 this.entryType = this.cd.readByte ();
37 this.cd.readByteArray (this.uniqueID16, 0, 16);
38 this.cd.readByteArray (this.userflags4, 0, 4);
39 this.cd.readByteArray (this.unused, 0, 8);
40 this.cd.readByteArray (this.unused, 0, 8);
41 this.SIDfirstSector = this.cd.readInt ();
42 this.lenStream = this.cd.readInt ();
43 this.cd.readByteArray (this.unused, 0, 4);
45 if (Clazz.exceptionOf (e, Exception)) {
46 System.out.println (e.toString ());
53 for (var i = 0; i < this.nBytesUnicodeName - 2; i += 2) this.entryName += String.fromCharCode (this.unicodeName64[i]);
55 this.isStandard = (this.entryType == 5 || this.lenStream >= this.cd.header.minBytesStandardStream);
56 this.isEmpty = (this.entryType == 0 || this.lenStream <= 0);