public abstract class AbstractSnmpValue extends Object implements SnmpValue
SNMP_COUNTER32, SNMP_COUNTER64, SNMP_END_OF_MIB, SNMP_GAUGE32, SNMP_INT32, SNMP_IPADDRESS, SNMP_NO_SUCH_INSTANCE, SNMP_NO_SUCH_OBJECT, SNMP_NULL, SNMP_OBJECT_IDENTIFIER, SNMP_OCTET_STRING, SNMP_OPAQUE, SNMP_TIMETICKS
Constructor and Description |
---|
AbstractSnmpValue() |
Modifier and Type | Method and Description |
---|---|
static boolean |
allBytesDisplayable(byte[] bytes) |
static boolean |
allBytesISO_8859_1(byte[] bytes)
If the value is in the unprintable ASCII range (< 32) and is not a:
|
static boolean |
allBytesUTF_8(byte[] bytes)
Based on a modified version of http://stackoverflow.com/a/1447720 for UTF-8 detection.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBytes, getType, isDisplayable, isEndOfMib, isError, isNull, isNumeric, toBigInteger, toDisplayString, toHexString, toInetAddress, toInt, toLong, toSnmpObjId
public static boolean allBytesDisplayable(byte[] bytes)
public static boolean allBytesUTF_8(byte[] bytes)
Based on a modified version of http://stackoverflow.com/a/1447720 for UTF-8 detection.
public static boolean allBytesISO_8859_1(byte[] bytes)
If the value is in the unprintable ASCII range (< 32) and is not a:
...or the byte is Delete (127) then this method will return false. Also, if the byte array has a NULL byte (0) that occurs anywhere besides the last character, return false. We will allow the NULL byte as a special case at the end of the string.
Copyright © 2021. All rights reserved.