code: @SuppressWarnings("SameParameterValue")
  	private int getStatusCode(final byte[] response, final int request) throws UnknownResponseException {
  		if (response == null || response.length < 3 || response[0] != OP_CODE_RESPONSE_CODE_KEY || response[1] != request ||
  				(response[2] != DFU_STATUS_SUCCESS && response[2] != SecureDfuError.BUTTONLESS_ERROR_OP_CODE_NOT_SUPPORTED
                          && response[2] != SecureDfuError.BUTTONLESS_ERROR_OPERATION_FAILED))
  			throw new UnknownResponseException("Invalid response received", response, OP_CODE_RESPONSE_CODE_KEY, request);
  		return response[2];
  	}
docs: Checks whether the response received is valid and returns the status code.
  
  @param response the response received from the DFU device.
  @param request  the expected Op Code.
  @return The status code.
  @throws UnknownResponseException if response was not valid.