code: public synchronized static void write(int fd, Charset charset, CharBuffer ... data) throws IllegalStateException, IOException {
          for(CharBuffer single : data) {
              write(fd, charset.encode(single));
          }
      }
docs: <p>Sends one or more CharBuffers to the serial port/device identified by the given file descriptor.</p>
  
  @param fd
  The file descriptor of the serial port/device.
  @param charset
  The character set to use for encoding/decoding bytes to/from text characters
  @param data
  One or more CharBuffers (or an array) of data to be transmitted. (variable-length-argument)