VariableBindingMapper<Long,BigInteger,String,GregorianCalendar,byte[]>public class VariableBindingMapperJava extends AbstractVariableBindingMapper<Long,BigInteger,String,GregorianCalendar,byte[]>
VariableBindingMapperJava maps SNMP4J VariableBinding variables
to Java native language objects and vice versa.| Constructor | Description |
|---|---|
VariableBindingMapperJava() |
| Modifier and Type | Method | Description |
|---|---|---|
org.snmp4j.smi.VariableBinding |
fromBinary(org.snmp4j.smi.OID oid,
byte[] binaryValue) |
Create a SNMP4J variable binding for an
OID and a binary string value. |
org.snmp4j.smi.VariableBinding |
fromDate(org.snmp4j.smi.OID oid,
GregorianCalendar dateValue) |
Create a SNMP4J variable binding for an
OID and a date value. |
org.snmp4j.smi.VariableBinding |
fromLong(org.snmp4j.smi.OID oid,
Long longValue) |
Create a SNMP4J variable binding for an
OID and a long value. |
org.snmp4j.smi.VariableBinding |
fromObject(org.snmp4j.smi.OID oid,
Object object) |
Create a SNMP4J variable binding for an
OID and an object value. |
org.snmp4j.smi.VariableBinding |
fromString(org.snmp4j.smi.OID oid,
String stringValue) |
Create a SNMP4J variable binding for an
OID and a string value. |
org.snmp4j.smi.VariableBinding |
fromUnsignedLong(org.snmp4j.smi.OID oid,
BigInteger unsignedLongValue) |
Create a SNMP4J variable binding for an
OID and an unsigned long value. |
byte[] |
toBinary(org.snmp4j.smi.VariableBinding variableBinding) |
Convert the provided variable binding to a binary value.
|
GregorianCalendar |
toDate(org.snmp4j.smi.VariableBinding variableBinding) |
Convert the provided variable binding to a date value.
|
Long |
toLong(org.snmp4j.smi.VariableBinding variableBinding) |
Convert the provided variable binding to a long value.
|
Object |
toObject(org.snmp4j.smi.VariableBinding variableBinding,
Class targetClass) |
Convert the provided variable binding to a value of the specified class.
|
String |
toString(org.snmp4j.smi.VariableBinding variableBinding) |
Convert the provided variable binding to a string value.
|
BigInteger |
toUnsignedLong(org.snmp4j.smi.VariableBinding variableBinding) |
Convert the provided variable binding to an unsigned long value.
|
formatLong, formatString, makeCalendar, makeDateAndTime, scanLong, scanString, validateDateAndTimepublic Long toLong(org.snmp4j.smi.VariableBinding variableBinding)
VariableBindingMappervariableBinding - a SNMP4J variable binding.public BigInteger toUnsignedLong(org.snmp4j.smi.VariableBinding variableBinding)
VariableBindingMappervariableBinding - a SNMP4J variable binding.public String toString(org.snmp4j.smi.VariableBinding variableBinding)
VariableBindingMappervariableBinding - a SNMP4J variable binding.public GregorianCalendar toDate(org.snmp4j.smi.VariableBinding variableBinding)
VariableBindingMappervariableBinding - a SNMP4J variable binding.public byte[] toBinary(org.snmp4j.smi.VariableBinding variableBinding)
VariableBindingMappervariableBinding - a SNMP4J variable binding.public Object toObject(org.snmp4j.smi.VariableBinding variableBinding, Class targetClass)
VariableBindingMappervariableBinding - the SNMP4J variable binding to convert (no modification of the object itself).targetClass - the class of the return type.targetClass with the converted value of
variableBinding or null if the conversion failed.public org.snmp4j.smi.VariableBinding fromLong(org.snmp4j.smi.OID oid,
Long longValue)
VariableBindingMapperOID and a long value.oid - an OID.longValue - a numeric long value.VariableBinding instance with the OID oid and variable
that matches the SNMP type defined for that OID with the specified long value,
null will be returned if the conversion failed.public org.snmp4j.smi.VariableBinding fromUnsignedLong(org.snmp4j.smi.OID oid,
BigInteger unsignedLongValue)
VariableBindingMapperOID and an unsigned long value.oid - an OID.unsignedLongValue - a numeric unsigned long value.VariableBinding instance with the OID oid and variable
that matches the SNMP type defined for that OID with the specified unsigned long value,
null will be returned if the conversion failed.public org.snmp4j.smi.VariableBinding fromString(org.snmp4j.smi.OID oid,
String stringValue)
VariableBindingMapperOID and a string value.oid - an OID.stringValue - a numeric long value.VariableBinding instance with the OID oid and variable
that matches the SNMP type defined for that OID with the specified string value,
null will be returned if the conversion failed.public org.snmp4j.smi.VariableBinding fromDate(org.snmp4j.smi.OID oid,
GregorianCalendar dateValue)
VariableBindingMapperOID and a date value.oid - an OID.dateValue - a string value.VariableBinding instance with the OID oid and variable
that matches the SNMP type defined for that OID with the specified date value,
null will be returned if the conversion failed.public org.snmp4j.smi.VariableBinding fromBinary(org.snmp4j.smi.OID oid,
byte[] binaryValue)
VariableBindingMapperOID and a binary string value.oid - an OID.binaryValue - a binary string value.VariableBinding instance with the OID oid and variable
that matches the SNMP type defined for that OID with the specified binary value,
null will be returned if the conversion failed.public org.snmp4j.smi.VariableBinding fromObject(org.snmp4j.smi.OID oid,
Object object)
VariableBindingMapperOID and an object value.oid - an OID.object - an object value.VariableBinding instance with the OID oid and variable
that matches the SNMP type defined for that OID with the specified object value,
null will be returned if the conversion failed.Copyright © 2020 SNMP4J.org. All rights reserved.