private void EnsureCanRead() { Debug.Assert(_stream != null); if (!_stream.CanRead) throw new NotSupportedException(SR.NotSupported_UnreadableStream); }