code: public void decode(AsnInputStream ais) throws ParseException {
          try {
              AsnInputStream localAis = ais.readSequenceStream();
  
              int tag = localAis.readTag();
              if (tag != AbortSource._TAG || localAis.getTagClass() != Tag.CLASS_CONTEXT_SPECIFIC)
                  throw new ParseException(PAbortCauseType.IncorrectTxPortion, null,
                          "Error decoding DialogAbortAPDU.abort-source: bad tag or tagClass, found tag=" + tag + ", tagClass="
                                  + localAis.getTagClass());
              this.abortSource = TcapFactory.createAbortSource(localAis);
  
              // optional sequence.
              if (localAis.available() == 0)
                  return;
  
              tag = localAis.readTag();
              if (tag != UserInformation._TAG || localAis.getTagClass() != Tag.CLASS_CONTEXT_SPECIFIC)
                  throw new ParseException(PAbortCauseType.IncorrectTxPortion, null,
                          "Error decoding DialogAbortAPDU.user-information: bad tag or tagClass, found tag=" + tag
                                  + ", tagClass=" + localAis.getTagClass());
              this.userInformation = TcapFactory.createUserInformation(localAis);
  
          } catch (IOException e) {
              throw new ParseException(PAbortCauseType.BadlyFormattedTxPortion, null,
                      "IOException while decoding DialogAbortAPDU: " + e.getMessage(), e);
          } catch (AsnException e) {
              throw new ParseException(PAbortCauseType.BadlyFormattedTxPortion, null,
                      "AsnException while decoding DialogAbortAPDU: " + e.getMessage(), e);
          }
  
      }
docs: /*
  (non-Javadoc)
  
  @see org.restcomm.protocols.ss7.tcap.asn.Encodable#decode(org.mobicents.protocols.asn.AsnInputStream)