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