code: public void decode(AsnInputStream ais) throws ParseException {
  
          try {
  
              byte[] buf = ais.readOctetString();
              if (buf == null || buf.length != 1)
                  throw new ParseException(PAbortCause.BadlyStructuredDialoguePortion, "Error decoding ProtocolVersion: bad octet string length");
  
              this.data = (buf[0] & 0xFF);
          } catch (IOException e) {
              throw new ParseException(PAbortCause.BadlyStructuredDialoguePortion, "IOException while decoding ProtocolVersion: " + e.getMessage(), e);
          } catch (AsnException e) {
              throw new ParseException(PAbortCause.BadlyStructuredDialoguePortion, "AsnException while decoding ProtocolVersion: " + e.getMessage(), e);
          }
      }
docs: /*
  (non-Javadoc)
  
  @see org.restcomm.protocols.ss7.tcap.asn.Encodable#decode(org.mobicents.protocols .asn.AsnInputStream)