Extract() public method

public Extract ( int bytes ) : BufferReader
bytes int
return BufferReader
示例#1
0
        public void ReadRecord(VssRecord record)
        {
            try
            {
                var recordHeader = new RecordHeader();
                recordHeader.Read(reader);

                var recordReader = reader.Extract(recordHeader.Length);

                // comment records always seem to have a zero CRC
                if (recordHeader.Signature != CommentRecord.SIGNATURE)
                {
                    recordHeader.CheckCrc();
                }

                recordHeader.CheckSignature(record.Signature);

                record.Read(recordReader, recordHeader);
            }
            catch (EndOfBufferException e)
            {
                throw new RecordTruncatedException(e.Message);
            }
        }