text: public override void write(char[] cbuf, int offset, int count){lock (@lock){checkNotClosed();if (cbuf == null){throw new System.ArgumentNullException("buffer == null");}java.util.Arrays.checkOffsetAndCount(cbuf.Length, offset, count);if (pos == 0 && count >= this.buf.Length){@out.write(cbuf, offset, count);return;}int available = this.buf.Length - pos;if (count < available){available = count;}if (available > 0){System.Array.Copy(cbuf, offset, this.buf, pos, available);pos += available;}if (pos == this.buf.Length){@out.write(this.buf, 0, this.buf.Length);pos = 0;if (count > available){offset += available;available = count - available;if (available >= this.buf.Length){@out.write(cbuf, offset, available);return;}System.Array.Copy(cbuf, offset, this.buf, pos, available);pos += available;}}}}