/// <summary> /// The read index. /// </summary> /// <remarks></remarks> private void ReadIndex() { FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read); BinaryReader br = new BinaryReader(fs); br.BaseStream.Position = this.indexOffset; for (int counter = 0; counter < count; counter++) { SIDs[counter] = new sid(br.ReadInt16(), br.ReadByte(), br.ReadByte()); US[counter] = new unicodeString(br.ReadInt32()); } br.Close(); fs.Close(); for (int counter = 0; counter < count - 1; counter++) { US[counter].size = US[counter + 1].offset - US[counter].offset - 1; } US[count - 1].size = tableSize - US[count - 1].offset; }
/// <summary> /// The read index. /// </summary> /// <remarks></remarks> private void ReadIndex() { FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read); BinaryReader br = new BinaryReader(fs); br.BaseStream.Position = this.indexOffset; for (int counter = 0; counter < count; counter++) { SIDs[counter] = new sid(br.ReadInt16(), br.ReadByte(), br.ReadByte()); US[counter] = new unicodeString(br.ReadInt32()); } br.Close(); fs.Close(); for (int counter = 0; counter < count - 1; counter++) { US[counter].size = US[counter + 1].offset - US[counter].offset - 1; } US[count - 1].size = tableSize - US[count - 1].offset; }