|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.adventnet.snmp.snmp2.SnmpVar | +--com.adventnet.snmp.snmp2.SnmpString | +--com.adventnet.snmp.snmp2.SnmpOpaque
Class of SNMP Opaque Variable - Sub-class of SnmpString. An SnmpOpaque is used sometimes to wrap objects of other types. The SnmpVar constructor for this object allows such a usage. Decoded value of SnmpVar on such a usage of SnmpOpaque can be obtained using the decodeVariable method.
Field Summary |
Fields inherited from class com.adventnet.snmp.snmp2.SnmpString |
enc |
Constructor Summary | |
SnmpOpaque(byte[] b)
Constructs a new SnmpOpaque object by taking a byte[]. |
|
SnmpOpaque(SnmpVar var)
Snmpvar constructor. |
|
SnmpOpaque(java.lang.String s)
Constructs a SnmpOpaque object by taking a string. |
Method Summary | |
SnmpVar |
decodeVariable()
Returns the SnmpVar object if any wrapped inside the SnmpOpaque object. |
java.lang.String |
getNumericValueAsString()
This method will throw UnsupportedOperationException since this is not a numeric data type. |
java.lang.String |
toTagString()
Converts the value of this SnmpOpaque object to a printable string where the type is tagged before the value with a tag OPAQUE: |
Methods inherited from class com.adventnet.snmp.snmp2.SnmpString |
equals, getVarObject, toBytes, toByteString, toString, toValue |
Methods inherited from class com.adventnet.snmp.snmp2.SnmpVar |
createVariable, getError, getType, getTypeString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SnmpOpaque(SnmpVar var)
var
- The SnmpVar object.public SnmpOpaque(java.lang.String s)
s
- String objectpublic SnmpOpaque(byte[] b)
b
- octet stringMethod Detail |
public java.lang.String toTagString()
toTagString
in class SnmpString
public java.lang.String getNumericValueAsString()
getNumericValueAsString
in class SnmpString
java.lang.UnsupportedOperationException
- Since this
is not a numeric data type.public SnmpVar decodeVariable() throws SnmpException
SnmpException
- is thrown if contents do not represent
a valid SnmpVar object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |