コード例 #1
0
        public override int ReadInt()
        {
            CheckAvaliable(SIZE_INT);
            int blockAvailable = _currentBlock.Available();
            int result;

            if (blockAvailable > SIZE_INT)
            {
                result = _currentBlock.ReadIntLE();
            }
            else
            {
                DataInputBlock nextBlock = GetDataInputBlock(_current_offset + blockAvailable);
                if (blockAvailable == SIZE_INT)
                {
                    result = _currentBlock.ReadIntLE();
                }
                else
                {
                    result = nextBlock.ReadIntLE(_currentBlock, blockAvailable);
                }
                _currentBlock = nextBlock;
            }
            _current_offset += SIZE_INT;
            return(result);
        }