Methods Summary |
---|
public static void | appendToOid(SnmpOid source, SnmpOid dest)Appends an SnmpOid representing an SnmpCounter64 to another OID.
if (source.getLength() != 1) {
throw new IllegalArgumentException() ;
}
dest.append(source) ;
|
public final synchronized java.lang.Object | clone()Clones the SnmpCounter64 object, making a copy of its data.
SnmpCounter64 newclone = null ;
try {
newclone = (SnmpCounter64) super.clone() ;
newclone.value = value ;
} 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 final java.lang.String | getTypeName()Returns a textual description of the type object.
return name ;
|
public int | intValue()Converts the counter value to its integer form.
return (int)value ;
|
public long | longValue()Returns the counter value of this SnmpCounter64 .
return value ;
|
public static int | nextOid(long[] index, int start)Scans an index OID, skips the counter value and returns the position
of the next value.
if (start >= index.length) {
throw new SnmpStatusException(SnmpStatusException.noSuchName) ;
}
else {
return start + 1 ;
}
|
public java.lang.Integer | toInteger()Converts the counter value to its Integer form.
return new Integer((int)value) ;
|
public java.lang.Long | toLong()Converts the counter value to its Long form.
return new Long(value) ;
|
public SnmpOid | toOid()Converts the counter value to its SnmpOid form.
return new SnmpOid(value) ;
|
public static SnmpOid | toOid(long[] index, int start)Extracts the counter from an index OID and returns its
value converted as an SnmpOid .
try {
return new SnmpOid(index[start]) ;
}
catch(IndexOutOfBoundsException e) {
throw new SnmpStatusException(SnmpStatusException.noSuchName) ;
}
|
public java.lang.String | toString()Converts the counter value to its String form.
return String.valueOf(value) ;
|