code: public void write(Charset charset, char[] data, int offset, int length) throws IllegalStateException, IOException{
          write(charset, CharBuffer.wrap(data, offset, length));
      }
docs: <p>Sends an array of characters to the serial port/device identified by the given file descriptor.</p>
  
  @param charset
  The character set to use for encoding/decoding bytes to/from text characters
  @param data
  An array of chars to be decoded into bytes and transmitted.
  @param offset
  The starting index (inclusive) in the array to send from.
  @param length
  The number of characters from the char array to transmit to the serial port.