[SNMP4J] To convert String d in this peice of code to integer.
Rajiv Subramanyam
rajiv_1024 at yahoo.com
Wed Mar 21 13:02:28 CET 2007
Hello,
pdu.add(new VariableBinding(new OID(new int[]
{1,3,6,1,2,1,25,2,3,1,6,9})));//RAM-hrStorageUsed
ResponseEvent responseEvent = snmp.send(pdu, target);
if (responseEvent != null)
{
response = responseEvent.getResponse();
pdu.setType(PDU.GET);
System.out.println("the obtained value is:");
VariableBinding vb=new VariableBinding();
vb=response.get(0);//gets oid and the value
String d= vb.getVariable().toString();
}
I am unable to convert the object vb value to integer.
I was only able to convert it to String d. Please help
me as i am unable to move forward with my project
without converting it into an integer.
With Regards
Rajiv
____________________________________________________________________________________
Now that's room service! Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097
More information about the SNMP4J
mailing list