code: final public boolean[] readDiscreteInputs(int serverAddress, int startAddress, int quantity) throws
              ModbusProtocolException, ModbusNumberException, ModbusIOException {
          ModbusRequest request = ModbusRequestBuilder.getInstance().buildReadDiscreteInputs(serverAddress, startAddress, quantity);
          ReadDiscreteInputsResponse response = (ReadDiscreteInputsResponse) processRequest(request);
          return response.getCoils();
      }
docs: This function code is used to read from 1 to 2000 contiguous status of discrete inputs in a
  remote device. The Request PDU specifies the starting address, i.e. the address of the first
  input specified, and the number of inputs. In the PDU Discrete Inputs are addressed starting
  at zero. Therefore Discrete inputs numbered 1-16 are addressed as 0-15.
  If the returned input quantity is not a multiple of eight, the remaining inputs in the final boolean array
  will be padded with FALSE.
  
  @param serverAddress a slave address
  @param startAddress  the address of the first input
  @param quantity      the number of inputs
  @return the discrete inputs
  @throws ModbusProtocolException if modbus-exception is received
  @throws ModbusNumberException   if response is invalid
  @throws ModbusIOException       if remote slave is unavailable