code: public synchronized static void read(int fd, int length, ByteBuffer buffer) throws IOException{
          buffer.put(read(fd, length));
      }
docs: <p>Reads a length bytes from the serial port/device into a provided ByteBuffer.</p>
  
  @param fd
  The file descriptor of the serial port/device.
  @param length
  The number of bytes to get from the serial port/device.
  This number must not be higher than the number of available bytes.
  @param buffer
  The ByteBuffer object to write to.