AW: [SNMP4J] problem with declaring octet Variable

Ali Daher alidaher at gebecom.de
Mon Jan 12 15:38:53 CET 2009


Thanks for your reply.

Here's what i have done:
String value = "01000000";
			        
			        byte[] theByteArray = value.getBytes();
			        
			        var2 = new OctetString(theByteArray);
				 
				  vb.setVariable(var2);



But I am still getting the same error message, which is wrong value

Regards

-----Ursprüngliche Nachricht-----
Von: snmp4j-bounces at agentpp.org [mailto:snmp4j-bounces at agentpp.org] Im
Auftrag von Jon Ruano
Gesendet: Montag, 12. Januar 2009 15:26
An: snmp4j at agentpp.org
Betreff: Re: [SNMP4J] problem with declaring octet Variable

Ali,

That 31 30 31 30 31 31 31 30 are the hex expression for the ASCII
codes of 10101010.
I'd convert that OID to byte and use the OctetString( byte [] )
constructor instead.

Jon

> I think I have problem with var2 how can I set the value with type octet
> such that the octet looks like "10101110" and not 31 30 31 30 31 31 31 30.
_______________________________________________
SNMP4J mailing list
SNMP4J at agentpp.org
http://lists.agentpp.org/mailman/listinfo/snmp4j




More information about the SNMP4J mailing list