code: public void encodeData(AsnOutputStream asnOs) throws MAPException {
  
          if (this.imsi == null && this.msisdn == null)
              throw new MAPException("Error while encoding " + _PrimitiveName + ": all choices must not be null");
          if (this.imsi != null && this.msisdn != null)
              throw new MAPException("Error while encoding " + _PrimitiveName + ": all choices must not be not null");
  
          if (this.imsi != null) {
              ((IMSIImpl) this.imsi).encodeData(asnOs);
          } else {
              ((ISDNAddressStringImpl) this.msisdn).encodeData(asnOs);
          }
      }
docs: /*
  (non-Javadoc)
  
  @see org.restcomm.protocols.ss7.map.api.primitives.MAPAsnPrimitive#encodeData
  (org.mobicents.protocols.asn.AsnOutputStream)