byte[] tlvWrappedNdefMessage = application.read(new KeyValue(Key.A, MfConstants.NDEF_KEY));
if (log.isDebugEnabled())
log.debug(NfcUtils.convertBinToASCII(tlvWrappedNdefMessage));
TypeLengthValueReader lengthValueReader = new TypeLengthValueReader(new ByteArrayInputStream(
tlvWrappedNdefMessage));
List<Record> records = new ArrayList<Record>();
while (lengthValueReader.hasNext()) {
Tlv tlv = lengthValueReader.next();
if (tlv instanceof NdefMessageTlv) {
NdefMessage ndefMessage = ndefMessageDecoder.decode(((NdefMessageTlv)tlv).getNdefMessage());
for (Record record : ndefMessageDecoder.decodeToRecords(ndefMessage)) {
records.add(record);
}