/** * New <CODE>SnmpEngineId</CODE> with an hex string value. Can handle engine Id format <host>:<port>. * @param hexString Hexa string. */ SnmpEngineId(String hexString) { engineId = SnmpTools.ascii2binary(hexString); this.hexString = hexString.toLowerCase(); }
/** * New <CODE>SnmpEngineId</CODE> with a binary value. You can use <CODE> SnmpTools </CODE> to convert from hex string to binary format. * @param bin Binary value */ SnmpEngineId(byte[] bin) { engineId = bin; hexString = SnmpTools.binary2ascii(bin).toLowerCase(); }
static void validateId(String str) throws IllegalArgumentException { byte[] arr = SnmpTools.ascii2binary(str); validateId(arr); }