private void SetupRead() { if (!CanRead) throw new NotSupportedException("Read not supported."); if (_bufferOwnedByWrite) { FlushWriteBuffer(); _bufferOwnedByWrite = false; } }