I use snmp4j to query some data .At first,I use colon length to judge whether the result is OctetString or String format.Fox example,it the length>6,than it is OctetString .But I find this way is wrong. Can anyone tell me how to udge whether the result is OctetString or String format ?
OctetString octetString=new OctetString("who:am");
System.out.println(octetString.toHexString()); //OctetString with 6 conlons
String testString="uT:DCN:SD-QD-HD-W-12.CN2.10GE0/1/0/2::CTVPN35036G::0505-ODF-07.A9/10";
System.out.println(testString.split(":").length); //normal string with 7 colons