if (command.isDataOnly()) {
commandAPDU = new CommandAPDU(0xff, 0, 0, 0, command.getData(), command.getOffset(),
command.getLength());
}
else
throw new NfcException("Only data mode supported");
if (log.isDebugEnabled())
log.debug("command: " + NfcUtils.convertBinToASCII(commandAPDU.getBytes()));
byte[] transmitControlResponse = card.transmitControlCommand(Acs.IOCTL_SMARTCARD_ACR122_ESCAPE_COMMAND,
commandAPDU.getBytes());
ResponseAPDU responseAPDU = new ResponseAPDU(transmitControlResponse);
if (log.isDebugEnabled())
log.debug("response: " + NfcUtils.convertBinToASCII(responseAPDU.getBytes()));
return new Response(responseAPDU.getSW1(), responseAPDU.getSW2(), responseAPDU.getData());
}
catch (CardException e) {
throw new NfcException(e);
}
}