code: public void decode(AsnInputStream ais) throws ParseException {
          oidVal = null;
          integerVal = 0;
          acType = null;
  
          try {
              if (!ais.isTagPrimitive() || ais.getTagClass() != Tag.CLASS_PRIVATE)
                  throw new ParseException(PAbortCause.BadlyStructuredDialoguePortion,
                          "Error decoding ApplicationContext: bad tagClass or not primitive, found tagClass=" + ais.getTagClass());
  
              switch (ais.getTag()) {
              case ApplicationContext._TAG_OBJECT_ID:
                  this.oidVal = ais.readObjectIdentifier();
                  acType = ACType.OId;
                  break;
  
              case ApplicationContext._TAG_INTEGER:
                  this.integerVal = ais.readInteger();
                  acType = ACType.Integer;
                  break;
  
              default:
                  throw new ParseException(PAbortCause.BadlyStructuredDialoguePortion,
                          "Error decoding ApplicationContext: bad tag, found tag=" + ais.getTag());
              }
  
          } catch (IOException e) {
              throw new ParseException(PAbortCause.BadlyStructuredDialoguePortion,
                      "IOException while decoding ApplicationContextName: " + e.getMessage(), e);
          } catch (AsnException e) {
              throw new ParseException(PAbortCause.BadlyStructuredDialoguePortion,
                      "AsnException while decoding ApplicationContextName: " + e.getMessage(), e);
          }
      }
docs: /*
  (non-Javadoc)
  
  @see org.restcomm.protocols.ss7.tcap.asn.Encodable#decode(org.mobicents.protocols .asn.AsnInputStream)