[SNMP4J] Re:SNMP4J Digest, Vol 38, Issue 15

通子 ytsun04 at 163.com
Fri Mar 23 09:28:09 CET 2007


 First,you can conver it to String.
Then ,you can conver it from String to integer.
  
在2007-03-22,snmp4j-request at agentpp.org 写道:
Send SNMP4J mailing list submissions to snmp4j at agentpp.org To subscribe or unsubscribe via the World Wide Web, visit http://lists.agentpp.org/mailman/listinfo/snmp4j or, via email, send a message with subject or body 'help' to snmp4j-request at agentpp.org You can reach the person managing the list at snmp4j-owner at agentpp.org When replying, please edit your Subject line so it is more specific than "Re: Contents of SNMP4J digest..." Today's Topics: 1. To convert String d in this peice of code to integer. (Rajiv Subramanyam) ---------------------------------------------------------------------- Message: 1 Date: Wed, 21 Mar 2007 05:02:28 -0700 (PDT) From: Rajiv Subramanyam <rajiv_1024 at yahoo.com> Subject: [SNMP4J] To convert String d in this peice of code to integer. To: snmp4j at agentpp.org Message-ID: <958360.44086.qm at web39503.mail.mud.yahoo.com> Content-Type: text/plain; charset=iso-8859-1 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 ------------------------------ _______________________________________________ SNMP4J mailing list SNMP4J at agentpp.org http://lists.agentpp.org/mailman/listinfo/snmp4j End of SNMP4J Digest, Vol 38, Issue 15 **************************************


More information about the SNMP4J mailing list