code: public boolean getDTR() throws IllegalStateException, IOException{
          // validate state
          if (isClosed())
              throw new IllegalStateException("Serial connection is not open; cannot 'getDTR()'.");
  
          // get pin state
          return com.pi4j.jni.Serial.getDTR(fileDescriptor);
      }
docs: <p>
  Get the DTR (data-terminal-ready) pin state.
  </p>
  
  @throws IllegalStateException thrown if the serial port is not already open.
  @throws IOException thrown on any error.