|
|||||||||
| 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.SnmpNull
public class SnmpNull
Class of SNMP Null Variable - Sub-class of SnmpVar. This class can be used to created a SnmpVar object of type SnmpNull. It also has methods to retrieve the value in different forms(eg. String, byte). The SnmpNull type is used as a placeholder. Additionally it can take up the error indication for a particular OID. i.e SnmpAPI.NOSUCHOBJECTEXP, SnmpAPI.NOSUCHINSTANCEEXP, or SnmpAPI.ENDOFMIBVIEWEXP.
| Field Summary | |
|---|---|
(package private) byte[] |
byteValue
|
(package private) int |
value
|
| Fields inherited from class com.adventnet.snmp.snmp2.SnmpVar |
|---|
Type, varbindErrorVal |
| Constructor Summary | |
|---|---|
SnmpNull()
Creates an SnmpNull object with the value 0. |
|
SnmpNull(byte val)
Creates an SnmpNull object. |
|
| Method Summary | |
|---|---|
(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. |
java.lang.Object |
getVarObject()
Returns the value of this SnmpNull object as an appropriate Object type, in this case returns null. |
byte[] |
toBytes()
Returns the value of this SnmpNull object as null with return type byte[]. |
java.lang.String |
toString()
Converts value of this SnmpNull object to a printable string. |
java.lang.String |
toTagString()
Converts the value of this SnmpNull object to a printable string where the type is tagged before the value with the appropriate tag Type. |
java.lang.Object |
toValue()
Returns the value of this SnmpNull object as an appropriate Object type, in this case returns null. |
| Methods inherited from class com.adventnet.snmp.snmp2.SnmpVar |
|---|
createVariable, getError, getType, getTypeString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
int value
byte[] byteValue
| Constructor Detail |
|---|
public SnmpNull()
public SnmpNull(byte val)
val - could be any of SnmpAPI.NOSUCHOBJECTEXP ,
SnmpAPI.NOSUCHINSTANCEEXP,
or SnmpAPI.ENDOFMIBVIEWEXP.| Method Detail |
|---|
public java.lang.Object getVarObject()
getVarObject in class SnmpVarpublic java.lang.Object toValue()
toValue in class SnmpVarpublic java.lang.String toString()
toString in class SnmpVarpublic java.lang.String toTagString()
toTagString in class SnmpVarpublic byte[] toBytes()
toBytes in class SnmpVarpublic java.lang.String getNumericValueAsString()
getNumericValueAsString in class SnmpVarjava.lang.UnsupportedOperationException - Since this
is not a numeric data type.
int encode(byte[] buff,
int space)
throws java.lang.ArrayIndexOutOfBoundsException
encode in class SnmpVarbuff - The buffer into which the value is to be encodedspace - The number of free bytes in the buffer
java.lang.ArrayIndexOutOfBoundsException - When there is
insufficient space in buffer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||