Package org.nfctools.ndef.wkt.handover.records.AlternativeCarrierRecord

Examples of org.nfctools.ndef.wkt.handover.records.AlternativeCarrierRecord.CarrierPowerState


    AlternativeCarrierRecord alternativeCarrierRecord = (AlternativeCarrierRecord)wellKnownRecord;

    ByteArrayOutputStream bout = new ByteArrayOutputStream();

    // cps
    CarrierPowerState carrierPowerState = alternativeCarrierRecord.getCarrierPowerState();
    if (carrierPowerState == null) {
      throw new NdefEncoderException("Expected carrier power state", alternativeCarrierRecord);
    }
    bout.write(carrierPowerState.getValue() & 0x7); // 3 lsb

    // carrier data reference: 1
    String carrierDataReference = alternativeCarrierRecord.getCarrierDataReference();
    if (carrierDataReference == null) {
      throw new NdefEncoderException("Expected carrier data reference", alternativeCarrierRecord);
View Full Code Here

TOP

Related Classes of org.nfctools.ndef.wkt.handover.records.AlternativeCarrierRecord.CarrierPowerState

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.