code: public void encodeData(AsnOutputStream asnOs) throws MAPException {
          if (this.subscriberIdentity == null) {
              throw new MAPException("Error while encoding " + _PrimitiveName
                      + " the mandatory parameter subscriberIdentity is not defined");
          }
          if (this.requestedInfo == null) {
              throw new MAPException("Error while encoding " + _PrimitiveName
                      + " the mandatory parameter requestedInfo is not defined");
          }
          if (this.gsmSCFAddress == null) {
              throw new MAPException("Error while encoding " + _PrimitiveName
                      + " the mandatory parameter gsmSCF-Address is not defined");
          }
  
          try {
              asnOs.writeTag(Tag.CLASS_CONTEXT_SPECIFIC, false, _TAG_SUBSCRIBER_IDENTITY);
              int pos = asnOs.StartContentDefiniteLength();
              ((SubscriberIdentityImpl) this.subscriberIdentity).encodeAll(asnOs);
              asnOs.FinalizeContent(pos);
          } catch (AsnException e) {
              throw new MAPException("AsnException while encoding " + _PrimitiveName
                      + " parameter subscriberIdentity [0] SubscriberIdentity");
          }
  
          ((RequestedInfoImpl) this.requestedInfo).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _TAG_REQUESTED_INFO);
  
          ((ISDNAddressStringImpl) this.gsmSCFAddress).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _TAG_GSM_SCF_ADDRESS);
  
          if (this.extensionContainer != null) {
              ((MAPExtensionContainerImpl) this.extensionContainer).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC,
                      _TAG_EXTENSION_CONTAINER);
          }
  
      }
docs: /*
  (non-Javadoc)
  
  @see org.restcomm.protocols.ss7.map.primitives.MAPAsnPrimitive#encodeData (org.mobicents.protocols.asn.AsnOutputStream)