Methods Summary |
---|
public final synchronized java.lang.Object | clone()Clones the SnmpNull object, making a copy of its data.
SnmpNull newclone = null ;
try {
newclone = (SnmpNull) super.clone() ;
newclone.tag = tag ;
} catch (CloneNotSupportedException e) {
throw new InternalError() ; // vm bug.
}
return newclone ;
|
public final synchronized SnmpValue | duplicate()Performs a clone action. This provides a workaround for the
SnmpValue interface.
return (SnmpValue) clone() ;
|
public int | getTag()Returns the tag value of this SnmpNull .
return tag ;
|
public final java.lang.String | getTypeName()Returns a textual description of the type object.
return name ;
|
public boolean | isEndOfMibViewValue()Checks if this SnmpNull object corresponds to an endOfMibView value.
return (tag == SnmpDataTypeEnums.errEndOfMibViewTag);
|
public boolean | isNoSuchInstanceValue()Checks if this SnmpNull object corresponds to a noSuchInstance value.
return (tag == SnmpDataTypeEnums.errNoSuchInstanceTag);
|
public boolean | isNoSuchObjectValue()Checks if this SnmpNull object corresponds to a noSuchObject value.
return (tag == SnmpDataTypeEnums.errNoSuchObjectTag);
|
public SnmpOid | toOid()Converts the NULL value to its SnmpOid form.
Normally, a NULL value cannot be used as an index value,
this method triggers an exception.
throw new IllegalArgumentException() ;
|
public java.lang.String | toString()Converts the NULL value to its ASN.1 String form.
When the tag is not the universal one, it is preprended
to the String form.
String result = "" ;
if (tag != 5) {
result += "[" + tag + "] " ;
}
result += "NULL" ;
switch(tag) {
case errNoSuchObjectTag :
result += " (noSuchObject)" ;
break ;
case errNoSuchInstanceTag :
result += " (noSuchInstance)" ;
break ;
case errEndOfMibViewTag :
result += " (endOfMibView)" ;
break ;
}
return result ;
|