com.sun.jaw.snmp.common
Class SnmpNull

java.lang.Object
  |
  +--com.sun.jaw.snmp.common.SnmpValue
        |
        +--com.sun.jaw.snmp.common.SnmpNull

public class SnmpNull
extends SnmpValue

The SnmpNull class represents an SNMP null value.

See Also:
Serialized Form

Field Summary
protected  int tag
          This is the tag of the NULL value.
 
Constructor Summary
SnmpNull()
          Constructs a new SnmpNull.
SnmpNull(int t)
          Constructs a new SnmpNull from the specified tag value.
SnmpNull(java.lang.String dummy)
          Constructs a new SnmpNull.
 
Method Summary
 java.lang.Object clone()
          Clones the SnmpNull object, making a copy of its data.
 SnmpValue duplicate()
          Performs a clone action.
 int getTag()
          Returns the tag value of this SnmpNull.
 java.lang.String getTypeName()
          Returns a textual description of the type object.
 SnmpOid toOid()
          Converts the NULL value to its SnmpOid form.
 java.lang.String toString()
          Converts the NULL value to its asn1 String form.
 
Methods inherited from class com.sun.jaw.snmp.common.SnmpValue
toAsn1String
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

tag

protected int tag
This is the tag of the NULL value. By default, it is the universal tag value.
Constructor Detail

SnmpNull

public SnmpNull()
Constructs a new SnmpNull.

SnmpNull

public SnmpNull(java.lang.String dummy)
Constructs a new SnmpNull. For mibgen private use only.
Parameters:
dummy -  

SnmpNull

public SnmpNull(int t)
Constructs a new SnmpNull from the specified tag value.
Parameters:
t - The initialization value.
Method Detail

getTag

public int getTag()
Returns the tag value of this SnmpNull.
Returns:
The value.

toString

public java.lang.String toString()
Converts the NULL value to its asn1 String form. When the tag is not the universal one, it is preprend to the String form.
Returns:
The String representation of the value.
Overrides:
toString in class java.lang.Object

toOid

public SnmpOid toOid()
Converts the NULL value to its SnmpOid form. Normally a NULL value cannot be used as an index value. So this method trigger an exception.
Returns:
The oid representation of the value.
Overrides:
toOid in class SnmpValue

duplicate

public final SnmpValue duplicate()
Performs a clone action. This provides a workaround for the SnmpValue interface.
Returns:
The SnmpValue clone.
Overrides:
duplicate in class SnmpValue

clone

public final java.lang.Object clone()
Clones the SnmpNull object, making a copy of its data.
Returns:
The Object clone.
Overrides:
clone in class java.lang.Object

getTypeName

public final java.lang.String getTypeName()
Returns a textual description of the type object.
Returns:
ASN.1 textual description.
Overrides:
getTypeName in class SnmpValue