protected CommandResponse execute(CommandPacket commandPacket) throws NfcException { byte[] result; if (this.felicaTag == null) { throw new NfcException("felicaTag is null!"); } try { if (!felicaTag.isConnected()) { felicaTag.connect(); } result = felicaTag.transceive(commandPacket.getBytes()); } catch (IOException e) { throw new NfcException(e); } return new CommandResponse(result); }
public FelicaTag(Tag tag) { super(tag); felicaTag = NfcF.get(tag); this.idm = new IDm(getId()); }