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