code: public void encodeData(AsnOutputStream asnOs) throws MAPException {
  
          if (this.interCugRestrictions == null)
              throw new MAPException("Error while encoding " + _PrimitiveName + ": interCugRestrictions required.");
  
          try {
  
              if (this.basicService != null)
                  ((ExtBasicServiceCodeImpl) this.basicService).encodeAll(asnOs);
  
              if (this.preferentialCugIndicator != null)
                  asnOs.writeInteger(this.preferentialCugIndicator);
  
              ((InterCUGRestrictionsImpl) this.interCugRestrictions).encodeAll(asnOs);
  
              if (this.extensionContainer != null)
                  ((MAPExtensionContainerImpl) this.extensionContainer).encodeAll(asnOs);
          } catch (IOException e) {
              throw new MAPException("IOException when encoding " + _PrimitiveName + ": " + e.getMessage(), e);
          } 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)