Package org.nfctools.ndef

Examples of org.nfctools.ndef.NdefMessageEncoder


  }

  public static byte[] toByteArray(Collection<Record> records) {
    ByteArrayOutputStream buffer = new ByteArrayOutputStream(1024);
    DataOutputStream output = new DataOutputStream(buffer);
    NdefMessageEncoder ndefMessageEncoder = NdefContext.getNdefMessageEncoder();
    try {
      byte[] bytes = ndefMessageEncoder.encode(records);
      output.writeByte(VERSION);
      output.writeInt(1);
      output.writeByte(ACTION_IMMEDIATE);
      output.writeInt(bytes.length);
      output.write(bytes);
View Full Code Here

TOP

Related Classes of org.nfctools.ndef.NdefMessageEncoder

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.