Package org.nfctools

Examples of org.nfctools.NfcException


          trailerBlock = block;
        }
        else {
          if (!Arrays.equals(block.getAccessConditions(), trailerBlock.getAccessConditions())
              || (block.getGeneralPurposeByte() != trailerBlock.getGeneralPurposeByte()))
            throw new NfcException(
                "Not all trailer blocks are equal for the APP-ID. Somebody tempered with the tag.");
        }

      }
    }
View Full Code Here


    try {
      formatCapabilityBlock();
      writeNdefMessage(records);
    }
    catch (IOException e) {
      throw new NfcException(e);
    }
  }
View Full Code Here

        readerWriter.writeBlock(page, block);
        offset += memoryLayout.getBytesPerPage();
      }
    }
    catch (IOException e) {
      throw new NfcException(e);
    }
  }
View Full Code Here

      CapabilityBlock capabilityBlock = new CapabilityBlock(readBlock[0].getData());
      capabilityBlock.setReadOnly();
      readerWriter.writeBlock(memoryLayout.getCapabilityPage(), capabilityBlock);
    }
    catch (IOException e) {
      throw new NfcException(e);
    }
  }
View Full Code Here

      if (log.isDebugEnabled())
        log.debug("response: " + NfcUtils.convertBinToASCII(responseAPDU.getBytes()));
      return new Response(responseAPDU.getSW1(), responseAPDU.getSW2(), responseAPDU.getData());
    }
    catch (CardException e) {
      throw new NfcException(e);
    }
  }
View Full Code Here

TOP

Related Classes of org.nfctools.NfcException

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.