docs: @Override
      public void open(String device, int baud, int dataBits, int parity, int stopBits, int flowControl)
              throws IOException{
  
          // open serial port
          fileDescriptor = com.pi4j.jni.Serial.open(device, baud, dataBits, parity, stopBits, flowControl);
  
          // read in initial buffered data (if any) into the receive buffer
          int available = com.pi4j.jni.Serial.available(fileDescriptor);
  
          if(available > 0) {
              byte[] initial_data = com.pi4j.jni.Serial.read(fileDescriptor, available);
              if (initial_data.length > 0) {
                  try {
                      // write data to the receive buffer
                      receiveBuffer.write(initial_data);
                  }
                  catch (IOException e) {
                      e.printStackTrace();
                  }
              }
          }
  
          // create a serial data listener event for data receive events from the serial device
          SerialInterrupt.addListener(fileDescriptor, new SerialInterruptListener() {
              @Override
              public void onDataReceive(SerialInterruptEvent event) {
  
                  // ignore any event triggers that are missing data
                  if(event.getLength() <= 0) return;
  
                  try {
                      SerialDataEvent sde = null;
  
                      if(isBufferingDataReceived()) {
                          // stuff event data payload into the receive buffer
                          receiveBuffer.write(event.getData());
  
                          //System.out.println("BUFFER SIZE : " + receiveBuffer.capacity());
                          //System.out.println("BUFFER LEFT : " + receiveBuffer.remaining());
                          //System.out.println("BUFFER AVAIL: " + receiveBuffer.available());
  
                          // create the serial data event; since we are buffering data
                          // it will be located in the receive buffer
                          sde = new SerialDataEvent(SerialImpl.this);
                      }
                      else{
                          // create the serial data event; since we are NOT buffering data
                          // we will pass the specific data payload directly into the event
                          sde = new SerialDataEvent(SerialImpl.this, event.getData());
                      }
  
                      // add a new serial data event notification to the thread pool for *immediate* execution
                      // we notify the event listeners on a separate thread to prevent blocking the native monitoring thread
                      executor.execute(new SerialDataEventDispatchTaskImpl(sde, listeners));
                  }
                  catch (IOException e) {
                      e.printStackTrace();
                  }
              }
          });
  
          // ensure file descriptor is valid
          if (fileDescriptor == -1) {
              throw new IOException("Cannot open serial port");
          }
      }