Ejemplo n.º 1
0
        private void reloadStartRecordPointer(Int64 sectionStartPointer)
        {
            Int64 position = 0;

            for (int i = 0; i < this.maxJumpTableLevel; i++)
            {
                position = sectionStartPointer + i * sectionlen + 46;  //46 is the start 46 bytes for counter, etc.
                byte[] nextpointer = new byte[8];

                lock (_object)
                {
                    IndexStream.Position = position + 11;   //warning, 11 is the next pointer position, it might change.
                    IndexStream.Read(nextpointer, 0, 8);
                }

                if (BitConverter.ToInt64(nextpointer, 0) > 0)
                {
                    break;
                }
            }

            lock (_object)
            {
                IndexStream.Position = sectionStartPointer + this.startRecordPointerPositionIndex;
                IndexStream.Write(BitConverter.GetBytes(position), 0, 8);
            }
        }