Package org.nfctools.spi.tama.request

Examples of org.nfctools.spi.tama.request.SetDepDataReq


    //    GetDepDataResp getDepDataResp = tamaCommunicator.sendMessage(new GetDepDataReq());
    //    if (getDepDataResp.getDataIn().length != 0)
    //      throw new IOException("unexpected data received");

    if (in.available() == 0) {
      tamaCommunicator.sendMessage(new SetDepDataReq(sendBuffer, 0, 0));
    }
    else {

      while (in.available() > 0) {

        int dataRead = in.read(sendBuffer, 0, sendBuffer.length);

        boolean moreInformationToSend = sendBuffer.length == dataRead && in.available() > 0;
        log.debug("Sending data... " + dataRead + " more to send: " + moreInformationToSend);
        log.debug("Send data: " + NfcUtils.convertBinToASCII(sendBuffer, 0, dataRead));

        if (moreInformationToSend)
          tamaCommunicator.sendMessage(new SetMetaDepDataReq(sendBuffer, 0, dataRead));
        else {
          tamaCommunicator.sendMessage(new SetDepDataReq(sendBuffer, 0, dataRead));
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.nfctools.spi.tama.request.SetDepDataReq

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.