code: @Override
      public void write(char[] buffer, int offset, int count) throws IOException {
          synchronized (lock) {
              checkStatus();
              Arrays.checkOffsetAndCount(buffer.length, offset, count);
              CharBuffer chars = CharBuffer.wrap(buffer, offset, count);
              convert(chars);
          }
      }
docs: Writes {@code count} characters starting at {@code offset} in {@code buf}
  to this writer. The characters are immediately converted to bytes by the
  character converter and stored in a local buffer. If the buffer gets full
  as a result of the conversion, this writer is flushed.
  
  @param buffer
  the array containing characters to write.
  @param offset
  the index of the first character in {@code buf} to write.
  @param count
  the maximum number of characters to write.
  @throws IndexOutOfBoundsException
  if {@code offset < 0} or {@code count < 0}, or if
  {@code offset + count} is greater than the size of
  {@code buf}.
  @throws IOException
  if this writer has already been closed or another I/O error
  occurs.