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;