public void ResetWriter() { if (this.writerStream != null) this.writerStream.Close(); this.writerStream = new MemoryStream(this.writeBuffer); this.writer = new BinaryWriter((Stream)this.writerStream); }