Examples of canWriteTrailerBlock()


Examples of org.nfctools.mf.block.TrailerBlock.canWriteTrailerBlock()

          + ", Block: " + blockId);

    int dataArea = (int)(mfAccess.getCard().getBlocksPerSector(mfAccess.getSector()) > 3 ? Math
        .floor((double)mfAccess.getCard().getBlocksPerSector(mfAccess.getSector()) / 5.0) : blockId);

    if ((blockId == trailerBlockId && !trailerBlock.canWriteTrailerBlock(mfAccess.getKey()))
        || (blockId != trailerBlockId && !trailerBlock.canWriteDataBlock(mfAccess.getKey(), dataArea))) {
      throw new MfLoginException("Write Access Denied. Sector: " + mfAccess.getSector() + ", Block: " + blockId
          + " Key: " + mfAccess.getKey().name());

    }
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.