Пример #1
0
 public EncodedSnmpVariable encode() {
   return EncodedSnmpVariable.newFromTypeAndValue(this.snmpType, this.value.toByteArray());
 }
Пример #2
0
 public static SnmpGenericNumber newFromEncodedSnmpVariable(SnmpType t, EncodedSnmpVariable tlv) {
   if (tlv.getSnmpType() != t) {
     throw new Error("The type specified in the encoded variable is not the expected type");
   }
   return new SnmpGenericNumber(tlv);
 }
Пример #3
0
 protected SnmpGenericNumber(EncodedSnmpVariable tlv) {
   this.value = new BigInteger(tlv.getValueAsByteArray());
   this.snmpType = tlv.getSnmpType();
 }