code: public void encodeData(AsnOutputStream asnOs) throws MAPException {
  
          if (this.cugSubscriptionList == null)
              throw new MAPException("Error while encoding " + _PrimitiveName + ": cugSubscriptionList required.");
          if (this.cugSubscriptionList.size() > 10) {
              throw new MAPException("Error while encoding " + _PrimitiveName
                      + ": Parameter cugSubscriptionList size must be from 0 to 10, found: " + this.cugSubscriptionList.size());
          }
  
          if (this.cugFeatureList != null) {
              if (this.cugFeatureList.size() < 1 || this.cugFeatureList.size() > 32) {
                  throw new MAPException("Error while encoding " + _PrimitiveName
                          + ": Parameter cugFeatureList size must be from 1 to 32, found: " + this.cugFeatureList.size());
              }
          }
  
          try {
  
              asnOs.writeTag(Tag.CLASS_UNIVERSAL, false, Tag.SEQUENCE);
              int posa = asnOs.StartContentDefiniteLength();
              for (CUGSubscription subscriptionItem : this.cugSubscriptionList) {
                  ((CUGSubscriptionImpl) subscriptionItem).encodeAll(asnOs);
              }
              asnOs.FinalizeContent(posa);
  
              if (this.cugFeatureList != null) {
                  asnOs.writeTag(Tag.CLASS_UNIVERSAL, false, Tag.SEQUENCE);
                  int posb = asnOs.StartContentDefiniteLength();
                  for (CUGFeature featureItem : this.cugFeatureList) {
                      ((CUGFeatureImpl) featureItem).encodeAll(asnOs);
                  }
                  asnOs.FinalizeContent(posb);
              }
  
              if (this.extensionContainer != null)
                  ((MAPExtensionContainerImpl) this.extensionContainer).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC,
                          _TAG_extensionContainer);
          } catch (AsnException e) {
              throw new MAPException("AsnException when encoding " + _PrimitiveName + ": " + e.getMessage(), e);
          }
      }
docs: /*
  (non-Javadoc)
  
  @see org.restcomm.protocols.ss7.map.primitives.MAPAsnPrimitive#encodeData (org.mobicents.protocols.asn.AsnOutputStream)