private void writePayLoad(byte data[]) throws SpiDeviceException { // use any of the instantiated registers to access this method to append command to payload data SPIFactory.INSTANCE.writeRead( configRegister.appendWriteCommandToDataArray( (byte) NRFCommand.WriteTxPayload.getCommand(), data)); // send a reuse command if it is just keep alive data if (Arrays.equals(rfKeepAlive, data)) { SPIFactory.INSTANCE.writeRead(new byte[] {(byte) NRFCommand.ReusePayLoad.getCommand()}); } }