Examples of CarrierTypeFormat


Examples of org.nfctools.ndef.wkt.handover.records.HandoverCarrierRecord.CarrierTypeFormat

  @Override
  public WellKnownRecord decodePayload(byte[] payload, NdefMessageDecoder messageDecoder) {

    HandoverCarrierRecord handoverCarrierRecord = new HandoverCarrierRecord();

    CarrierTypeFormat carrierTypeFormat = CarrierTypeFormat.toCarrierTypeFormat((byte)(payload[0] & 0x7));

    handoverCarrierRecord.setCarrierTypeFormat(carrierTypeFormat);

    int carrierTypeLength = (int)(payload[1] & 0xFF);
    byte[] carrierType = new byte[carrierTypeLength];
View Full Code Here

Examples of org.nfctools.ndef.wkt.handover.records.HandoverCarrierRecord.CarrierTypeFormat

    HandoverCarrierRecord handoverCarrierRecord = (HandoverCarrierRecord)wellKnownRecord;

    ByteArrayOutputStream bout = new ByteArrayOutputStream();

    CarrierTypeFormat carrierTypeFormat = handoverCarrierRecord.getCarrierTypeFormat();
    if (carrierTypeFormat == null) {
      throw new NdefEncoderException("Expected carrier type format", handoverCarrierRecord);
    }
    bout.write(carrierTypeFormat.getValue() & 0x7);

    Object carrierType = handoverCarrierRecord.getCarrierType();

    byte[] encoded;
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.