Package org.nfctools.mf.tlv

Examples of org.nfctools.mf.tlv.Tlv


  public static void outputNdefMessage(MfUlReaderWriter readerWriter, MemoryLayout memoryLayout) {
    TypeLengthValueReader reader = new TypeLengthValueReader(new TagInputStream(memoryLayout, readerWriter));

    while (reader.hasNext()) {
      Tlv tlv = reader.next();
      if (tlv instanceof NdefMessageTlv) {
        NdefMessage ndefMessage = decoder.decode(((NdefMessageTlv)tlv).getNdefMessage());
        for (Record record : decoder.decodeToRecords(ndefMessage)) {
          System.out.println(record);
        }
View Full Code Here


  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);
        }
View Full Code Here

          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);
          }
View Full Code Here

TOP

Related Classes of org.nfctools.mf.tlv.Tlv

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.