internal int InternalReadInt32()
{
if (!_isOpen)
{
throw new ObjectDisposedException(null, SR.ObjectDisposed_StreamClosed);
}
int pos = (_position += 4); // use temp to avoid race
if (pos > _length)
{
_position = _length;
throw new EndOfStreamException(SR.IO_EOF_ReadBeyondEOF);
}
return (int)(_buffer[pos - 4] | _buffer[pos - 3] << 8 | _buffer[pos - 2] << 16 | _buffer[pos - 1] << 24);
}