GSF.IO.BlockAllocatedMemoryStream.ReadByte C# (CSharp) Method

ReadByte() public method

Reads a byte from the current stream.
The stream is closed.
public ReadByte ( ) : int
return int
        public override int ReadByte()
        {
            if (m_disposed)
                throw new ObjectDisposedException("BlockAllocatedMemoryStream", "The stream is closed.");

            if (m_position >= m_length)
                return -1;

            byte value = m_blocks[(int)(m_position >> ShiftBits)][(int)(m_position & BlockMask)];
            m_position++;

            return value;
        }