@Test public void testGetProtoCounter63Value() throws UnsupportedEncodingException { for (byte[] bytes : new byte[][] { "abcdef01".getBytes("UTF-8"), { (byte)0x79, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff }, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1 } }) { assertNotNull(Arrays.toString(bytes), SnmpUtils.getProtoCounter63Value(bytes)); } for (byte[] bytes : new byte[][] { "abcdef".getBytes("UTF-8"), "01234567".getBytes("UTF-8"), "00000000".getBytes("UTF-8"), "11111111".getBytes("UTF-8"), "99999999".getBytes("UTF-8"), { (byte)0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }, { (byte)0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }, { (byte)0x80, (byte)0x80, (byte)0x80, (byte)0x80, (byte)0x80, (byte)0x80, (byte)0x80, (byte)0x80 }, { (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff } }) { assertNull(Arrays.toString(bytes), SnmpUtils.getProtoCounter63Value(bytes)); } }
public static Long getProtoCounter63Value(SnmpValue value) { Long retval = getProtoCounter63Value(value.getBytes()); if (retval != null && value.isDisplayable()) { LogUtils.infof(SnmpUtils.class, "Value '%s' is entirely displayable but still meets our other checks to be treated as a proto-Counter64. This may not be what you want.", new String(value.getBytes())); } return retval; }
SnmpUtils { public static Long getProtoCounter63Value(SnmpValue value) { Long retval = getProtoCounter63Value(value.getBytes()); if (retval != null && value.isDisplayable()) { LogUtils.infof(SnmpUtils.class, "Value '%s' is entirely displayable but still meets our other checks to be treated as a proto-Counter64. This may not be what you want.", new String(value.getBytes())); } return retval; } }
SnmpUtils { public static Long getProtoCounter63Value(SnmpValue value) { Long retval = getProtoCounter63Value(value.getBytes()); if (retval != null && value.isDisplayable()) { LogUtils.infof(SnmpUtils.class, "Value '%s' is entirely displayable but still meets our other checks to be treated as a proto-Counter64. This may not be what you want.", new String(value.getBytes())); } return retval; }  }
SnmpUtils { public static Long getProtoCounter63Value(SnmpValue value) { Long retval = getProtoCounter63Value(value.getBytes()); if (retval != null && value.isDisplayable()) { LogUtils.infof(SnmpUtils.class, "Value '%s' is entirely displayable but still meets our other checks to be treated as a proto-Counter64. This may not be what you want.", new String(value.getBytes())); } return retval; }  static SnmpWalker createWalker(SnmpAgentConfig agentConfig, String name, CollectionTracker... trackers); static SnmpWalker createWalker(SnmpAgentConfig agentConfig, String name, CollectionTracker tracker); static SnmpValue get(SnmpAgentConfig agentConfig, SnmpObjId oid); static SnmpValue[] get(SnmpAgentConfig agentConfig, SnmpObjId oids[]); static SnmpValue getNext(SnmpAgentConfig agentConfig, SnmpObjId oid); static SnmpValue[] getNext(SnmpAgentConfig agentConfig, SnmpObjId[] oids); static SnmpValue[] getBulk(SnmpAgentConfig agentConfig, SnmpObjId[] oids); static SnmpValue set(final SnmpAgentConfig agentConfig, final SnmpObjId oid, final SnmpValue value); static SnmpValue[] set(final SnmpAgentConfig agentConfig, final SnmpObjId[] oids, final SnmpValue[] values); static Properties getConfig(); static List<SnmpValue> getColumns(final SnmpAgentConfig agentConfig, final String name, final SnmpObjId oid); static Map<SnmpInstId, SnmpValue> getOidValues(SnmpAgentConfig agentConfig, String name, SnmpObjId oid); static void setConfig(Properties config); static SnmpStrategy getStrategy(); static void registerForTraps(final TrapNotificationListener listener, final TrapProcessorFactory processorFactory, final InetAddress address, final int snmpTrapPort, final List<SnmpV3User> snmpUsers); static void registerForTraps(final TrapNotificationListener listener, final TrapProcessorFactory processorFactory, final InetAddress address, final int snmpTrapPort); static void unregisterForTraps(final TrapNotificationListener listener, final InetAddress address, final int snmpTrapPort); static SnmpValueFactory getValueFactory(); static SnmpV1TrapBuilder getV1TrapBuilder(); static SnmpTrapBuilder getV2TrapBuilder(); static SnmpV3TrapBuilder getV3TrapBuilder(); static SnmpV2TrapBuilder getV2InformBuilder(); static SnmpV3TrapBuilder getV3InformBuilder(); static String getLocalEngineID(); static String getHexString(byte[] raw); static Long getProtoCounter63Value(SnmpValue value); static Long getProtoCounter63Value(byte[] valBytes); }
SnmpUtils { public static Long getProtoCounter63Value(SnmpValue value) { Long retval = getProtoCounter63Value(value.getBytes()); if (retval != null && value.isDisplayable()) { LogUtils.infof(SnmpUtils.class, "Value '%s' is entirely displayable but still meets our other checks to be treated as a proto-Counter64. This may not be what you want.", new String(value.getBytes())); } return retval; }  static SnmpWalker createWalker(SnmpAgentConfig agentConfig, String name, CollectionTracker... trackers); static SnmpWalker createWalker(SnmpAgentConfig agentConfig, String name, CollectionTracker tracker); static SnmpValue get(SnmpAgentConfig agentConfig, SnmpObjId oid); static SnmpValue[] get(SnmpAgentConfig agentConfig, SnmpObjId oids[]); static SnmpValue getNext(SnmpAgentConfig agentConfig, SnmpObjId oid); static SnmpValue[] getNext(SnmpAgentConfig agentConfig, SnmpObjId[] oids); static SnmpValue[] getBulk(SnmpAgentConfig agentConfig, SnmpObjId[] oids); static SnmpValue set(final SnmpAgentConfig agentConfig, final SnmpObjId oid, final SnmpValue value); static SnmpValue[] set(final SnmpAgentConfig agentConfig, final SnmpObjId[] oids, final SnmpValue[] values); static Properties getConfig(); static List<SnmpValue> getColumns(final SnmpAgentConfig agentConfig, final String name, final SnmpObjId oid); static Map<SnmpInstId, SnmpValue> getOidValues(SnmpAgentConfig agentConfig, String name, SnmpObjId oid); static void setConfig(Properties config); static SnmpStrategy getStrategy(); static void registerForTraps(final TrapNotificationListener listener, final TrapProcessorFactory processorFactory, final InetAddress address, final int snmpTrapPort, final List<SnmpV3User> snmpUsers); static void registerForTraps(final TrapNotificationListener listener, final TrapProcessorFactory processorFactory, final InetAddress address, final int snmpTrapPort); static void unregisterForTraps(final TrapNotificationListener listener, final InetAddress address, final int snmpTrapPort); static SnmpValueFactory getValueFactory(); static SnmpV1TrapBuilder getV1TrapBuilder(); static SnmpTrapBuilder getV2TrapBuilder(); static SnmpV3TrapBuilder getV3TrapBuilder(); static SnmpV2TrapBuilder getV2InformBuilder(); static SnmpV3TrapBuilder getV3InformBuilder(); static String getLocalEngineID(); static String getHexString(byte[] raw); static Long getProtoCounter63Value(SnmpValue value); static Long getProtoCounter63Value(byte[] valBytes);  }