code: public void decode(AsnInputStream ais) throws ParseException {
  
          try {
              if (this.type == ErrorCodeType.Global) {
                  this.globalErrorCode = ais.readObjectIdentifier();
              } else if (this.type == ErrorCodeType.Local) {
                  this.localErrorCode = ais.readInteger();
              } else {
                  throw new ParseException(null, GeneralProblemType.MistypedComponent);
              }
          } catch (IOException e) {
              e.printStackTrace();
              throw new ParseException(null, GeneralProblemType.BadlyStructuredComponent, "IOException while parsing ErrorCode: "
                      + e.getMessage(), e);
          } catch (AsnException e) {
              e.printStackTrace();
              throw new ParseException(null, GeneralProblemType.BadlyStructuredComponent,
                      "AsnException while parsing ErrorCode: " + e.getMessage(), e);
          }
      }
docs: /*
  (non-Javadoc)
  
  @see org.restcomm.protocols.ss7.tcap.asn.Encodable#decode(org.mobicents.protocols .asn.AsnInputStream)