code: public void encodeData(AsnOutputStream asnOs) throws MAPException {
          if (this.areaType == null) {
              throw new MAPException("Error while encoding " + _PrimitiveName
                      + " the mandatory parameter[areaType [0] AreaType] is not defined");
          }
  
          if (this.areaIdentification == null) {
              throw new MAPException("Error while encoding " + _PrimitiveName
                      + " the mandatory parameter[areaIdentification [1] AreaIdentification] is not defined");
          }
  
          try {
              asnOs.writeInteger(Tag.CLASS_CONTEXT_SPECIFIC, _TAG_areaType, this.areaType.getType());
  
              ((AreaIdentificationImpl) this.areaIdentification).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC,
                      _TAG_areaIdentification);
  
          } 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.api.primitives.MAPAsnPrimitive#encodeData
  (org.mobicents.protocols.asn.AsnOutputStream)