public override int BeginRead() { if (inStream == null) { throw new IOException("BeginRead must be called only after EndWrite"); } return base.BeginRead(); }