}
}
protected void convertRecords(TypeLengthValueReader reader) {
lastReadRecords = new ArrayList<Record>();
NdefMessageDecoder ndefMessageDecoder = NdefContext.getNdefMessageDecoder();
while (reader.hasNext()) {
Tlv tlv = reader.next();
if (tlv instanceof NdefMessageTlv) {
NdefMessage ndefMessage = ndefMessageDecoder.decode(((NdefMessageTlv)tlv).getNdefMessage());
for (Record record : ndefMessageDecoder.decodeToRecords(ndefMessage)) {
lastReadRecords.add(record);
}
}
}
}