Beispiel #1
0
        protected void createTableDirectory()
        {
            tableDirectory = new Hashmap();
            rf.seek(directoryOffset);
            int id = rf.readInt();

            if (id != 0x00010000)
            {
                throw new DocumentException(fileName + " is not a true type file.");
            }
            int num_tables = rf.readUnsignedShort();

            rf.skipBytes(6);
            for (int k = 0; k < num_tables; ++k)
            {
                string tag           = readStandardstring(4);
                int[]  tableLocation = new int[3];
                tableLocation[TABLE_CHECKSUM] = rf.readInt();
                tableLocation[TABLE_OFFSET]   = rf.readInt();
                tableLocation[TABLE_LENGTH]   = rf.readInt();
                tableDirectory.Add(tag, tableLocation);
            }
        }