public void write(char[] buffer, int offset, int len) {Arrays.checkOffsetAndCount(buffer.length, offset, len);synchronized (lock) {expand(len);System.arraycopy(buffer, offset, this.buf, this.count, len);this.count += len;}}