code: public void encodeData(AsnOutputStream asnOs) throws MAPException {
          if (this.mSCNumber == null && this.sGSNNumber == null)
              throw new MAPException("Error when encoding " + _PrimitiveName + ": both mscNumber and sgsnNumber must not be null");
          if (this.mSCNumber != null && this.sGSNNumber != null)
              throw new MAPException("Error when encoding " + _PrimitiveName
                      + ": both mscNumber and sgsnNumber must not be not null");
  
          if (this.mSCNumber != null) {
              ((ISDNAddressStringImpl) this.mSCNumber).encodeData(asnOs);
          } else {
              ((ISDNAddressStringImpl) this.sGSNNumber).encodeData(asnOs);
          }
      }
docs: /*
  (non-Javadoc)
  
  @see org.restcomm.protocols.ss7.map.api.primitives.MAPAsnPrimitive#encodeData
  (org.mobicents.protocols.asn.AsnOutputStream)