Package org.nfctools.mf.mad

Examples of org.nfctools.mf.mad.ApplicationDirectory.createApplication()


      ApplicationDirectory applicationDirectory = readerWriter.createApplicationDirectory(new MadKeyConfig(Key.A,
          MfConstants.TRANSPORT_KEY, writeKey));
      TrailerBlock readWriteTrailerBlock = ClassicHandler.createReadWriteDataTrailerBlock();
      readWriteTrailerBlock.setKey(Key.A, writeKey);
      readWriteTrailerBlock.setKey(Key.B, writeKey);
      Application application = applicationDirectory.createApplication(MfConstants.NDEF_APP_ID,
          applicationDirectory.getMaxContinousSize(), writeKey, readWriteTrailerBlock);
      return application;
    }
    catch (IOException e) {
      throw new NfcException(e);
View Full Code Here


    /*
     * The specs states that the TLV terminator can be left out if the message ends with the available space.
     * One might want to check if the available size on the card is one byte less than the tlv wrapped message. If
     * it is the case the TLV terminator could be removed.
     */
    Application application = applicationDirectory.createApplication(MfNdefConstants.NDEF_APP_ID,
        tlvWrappedNdefData.length, writeKeyValue, trailerBlock);

    if (log.isDebugEnabled())
      log.debug("Length: " + tlvWrappedNdefData.length + " [" + NfcUtils.convertBinToASCII(tlvWrappedNdefData)
          + "]");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.