public override int Read(byte[] buffer, int offset, int count)
{
CheckIfStreamClosed();
if (buffer == null)
throw new ArgumentNullException(nameof(buffer));
if (offset < 0 || offset > buffer.Length)
throw new ArgumentOutOfRangeException(nameof(offset));
if (count < 0 || count > buffer.Length - offset)
throw new ArgumentOutOfRangeException(nameof(count));
int iBytesRead = (int)_sb.Read(_lPosition, buffer, offset, count);
_lPosition += iBytesRead;
return iBytesRead;
}