|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.adventnet.snmp.snmp2.SnmpVar
com.adventnet.snmp.snmp2.SnmpString
com.adventnet.snmp.snmp2.SnmpOpaque
public class 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 |
|---|
byteValue, enc, s_emptyString, value |
| Fields inherited from class com.adventnet.snmp.snmp2.SnmpVar |
|---|
Type, varbindErrorVal |
| Constructor Summary | |
|---|---|
SnmpOpaque()
Empty Constructor |
|
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. |
(package private) int |
encode(byte[] buff,
int space)
ASN encoder |
java.lang.String |
getNumericValueAsString()
This method will throw UnsupportedOperationException since this is not a numeric data type. |
(package private) static SnmpVar |
newInstance(byte[] b)
Factory method for decode |
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 |
|---|
SnmpOpaque()
public SnmpOpaque(SnmpVar var)
var - The SnmpVar object.public SnmpOpaque(java.lang.String s)
s - String objectpublic SnmpOpaque(byte[] b)
b - octet string| Method Detail |
|---|
static SnmpVar newInstance(byte[] b)
b - The bytevaluepublic java.lang.String toTagString()
toTagString in class SnmpStringpublic java.lang.String getNumericValueAsString()
getNumericValueAsString in class SnmpStringjava.lang.UnsupportedOperationException - Since this
is not a numeric data type.
int encode(byte[] buff,
int space)
throws java.lang.ArrayIndexOutOfBoundsException
encode in class SnmpStringbuff - The buffer into which the value is to be encodedspace - The number of free bytes in the buffer
throws - an ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException - When there is
insufficient space in buffer
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 | ||||||||