code: public void decode(AsnInputStream ais) throws ParseException {
  
          try {
              long val = ais.readInteger();
              if (ais.getTag() == ErrorCode._TAG_NATIONAL) {
                  this.setNationalErrorCode(val);
              } else {
                  this.setPrivateErrorCode(val);
              }
          } catch (IOException e) {
              throw new ParseException(RejectProblem.generalBadlyStructuredCompPortion, "IOException while decoding ErrorCode: " + e.getMessage(), e);
          } catch (AsnException e) {
              throw new ParseException(RejectProblem.generalBadlyStructuredCompPortion, "AsnException while decoding ErrorCode: " + e.getMessage(), e);
          }
      }
docs: /*
  (non-Javadoc)
  
  @see org.restcomm.protocols.ss7.tcap.asn.Encodable#decode(org.mobicents.protocols .asn.AsnInputStream)