code: public void encodeData(AsnOutputStream asnOs) throws MAPException {
          if (this.areaList == null) {
              throw new MAPException("Error while encoding " + _PrimitiveName
                      + " the mandatory parameter[areaList [0] AreaList] is not defined");
          }
          if (this.areaList.size() < 1 || this.areaList.size() > 10) {
              throw new MAPException("Error while encoding " + _PrimitiveName + " areaList size must be from 1 to 10, found: "
                      + this.areaList.size());
          }
  
          try {
              asnOs.writeTag(Tag.CLASS_CONTEXT_SPECIFIC, false, _TAG_areaList);
              int pos = asnOs.StartContentDefiniteLength();
              for (Area ri : this.areaList) {
                  if (ri != null) {
                      AreaImpl rii = (AreaImpl) ri;
                      rii.encodeAll(asnOs);
                  }
              }
              asnOs.FinalizeContent(pos);
          } catch (AsnException e) {
              throw new MAPException("AsnException when encoding " + _PrimitiveName + ": " + e.getMessage(), e);
          }
      }
docs: /*
  (non-Javadoc)
  
  @see org.restcomm.protocols.ss7.map.api.primitives.MAPAsnPrimitive#encodeData
  (org.mobicents.protocols.asn.AsnOutputStream)