示例#1
0
        private static ByteArrayBuffer PrepareFileHeaderReader(LocalObjectContainer file)
        {
            ByteArrayBuffer reader = new ByteArrayBuffer(ReaderLength());

            reader.Read(file, 0, 0);
            return(reader);
        }
示例#2
0
        protected override void Read(LocalObjectContainer container, ByteArrayBuffer reader
                                     )
        {
            NewTimerFileLock(container);
            OldEncryptionOff(container);
            CheckThreadFileLock(container, reader);
            reader.Seek(BlocksizeOffset);
            container.BlockSizeReadFromFile(reader.ReadInt());
            SystemData systemData = container.SystemData();

            systemData.ClassCollectionID(reader.ReadInt());
            container.SystemData().IdSystemType(reader.ReadByte());
            _variablePart = CreateVariablePart(container);
            int variablePartAddress = reader.ReadInt();
            int variablePartLength  = reader.ReadInt();

            _variablePart.Read(variablePartAddress, variablePartLength);
            _transactionPointerAddress = reader.ReadInt();
            if (_transactionPointerAddress != 0)
            {
                ByteArrayBuffer buffer = new ByteArrayBuffer(TransactionPointerLength);
                buffer.Read(container, _transactionPointerAddress, 0);
                systemData.TransactionPointer1(buffer.ReadInt());
                systemData.TransactionPointer2(buffer.ReadInt());
            }
        }
示例#3
0
 protected override void Read(LocalObjectContainer container, ByteArrayBuffer reader
     )
 {
     NewTimerFileLock(container);
     OldEncryptionOff(container);
     CheckThreadFileLock(container, reader);
     reader.Seek(BlocksizeOffset);
     container.BlockSizeReadFromFile(reader.ReadInt());
     var systemData = container.SystemData();
     systemData.ClassCollectionID(reader.ReadInt());
     container.SystemData().IdSystemType(reader.ReadByte());
     _variablePart = CreateVariablePart(container);
     var variablePartAddress = reader.ReadInt();
     var variablePartLength = reader.ReadInt();
     _variablePart.Read(variablePartAddress, variablePartLength);
     _transactionPointerAddress = reader.ReadInt();
     if (_transactionPointerAddress != 0)
     {
         var buffer = new ByteArrayBuffer(TransactionPointerLength);
         buffer.Read(container, _transactionPointerAddress, 0);
         systemData.TransactionPointer1(buffer.ReadInt());
         systemData.TransactionPointer2(buffer.ReadInt());
     }
 }
示例#4
0
 private static ByteArrayBuffer PrepareFileHeaderReader(LocalObjectContainer file)
 {
     var reader = new ByteArrayBuffer(ReaderLength());
     reader.Read(file, 0, 0);
     return reader;
 }