protected void ReadLoca()
{
int[] tableLocation;
tableDirectory.TryGetValue("head", out tableLocation);
if (tableLocation == null)
throw new DocumentException(MessageLocalization.GetComposedMessage("table.1.does.not.exist.in.2", "head", fileName));
rf.Seek(tableLocation[TABLE_OFFSET] + HEAD_LOCA_FORMAT_OFFSET);
locaShortTable = (rf.ReadUnsignedShort() == 0);
tableDirectory.TryGetValue("loca", out tableLocation);
if (tableLocation == null)
throw new DocumentException(MessageLocalization.GetComposedMessage("table.1.does.not.exist.in.2", "loca", fileName));
rf.Seek(tableLocation[TABLE_OFFSET]);
if (locaShortTable) {
int entries = tableLocation[TABLE_LENGTH] / 2;
locaTable = new int[entries];
for (int k = 0; k < entries; ++k)
locaTable[k] = rf.ReadUnsignedShort() * 2;
}
else {
int entries = tableLocation[TABLE_LENGTH] / 4;
locaTable = new int[entries];
for (int k = 0; k < entries; ++k)
locaTable[k] = rf.ReadInt();
}
}