|
SNMP Stack 5_1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.co.westhawk.snmp.stack.AsnObject | +--uk.co.westhawk.snmp.stack.AsnUnsInteger
This class represents ASN.1 32-bit unsigned integer. It is used for TIMETICKS, COUNTER, GAUGE.
SnmpConstants.TIMETICKS
,
SnmpConstants.COUNTER
,
SnmpConstants.GAUGE
Field Summary | |
protected long |
value
The internal value of AsnUnsInteger. |
Fields inherited from class uk.co.westhawk.snmp.stack.AsnObject |
contentsLength, debug, headerLength, isCorrect, startPos, type |
Constructor Summary | |
AsnUnsInteger(java.io.InputStream in,
int len)
Constructor. |
|
AsnUnsInteger(long v)
Constructor. |
|
AsnUnsInteger(long v,
byte t)
Constructor to create a specific type of AsnUnsInteger. |
Method Summary | |
protected long |
bytesToLong(byte[] data)
Changes an array of bytes into a long. |
boolean |
equals(java.lang.Object obj)
Compares this object to the specified object. |
long |
getValue()
Returns the value representation of the AsnUnsInteger. |
int |
hashCode()
Returns a hash code for this AsnUnsInteger . |
java.lang.String |
toString()
Returns the string representation of the AsnUnsInteger. |
Methods inherited from class uk.co.westhawk.snmp.stack.AsnObject |
getRespType, getRespTypeString, setDebug |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected long value
Constructor Detail |
public AsnUnsInteger(long v)
v
- The value of the AsnUnsIntegerSnmpConstants.TIMETICKS
public AsnUnsInteger(long v, byte t)
v
- The value of the AsnUnsIntegert
- The type of the AsnUnsIntegerSnmpConstants.TIMETICKS
,
SnmpConstants.COUNTER
,
SnmpConstants.GAUGE
public AsnUnsInteger(java.io.InputStream in, int len) throws java.io.IOException
in
- The input stream from which the value should be readlen
- The length of the AsnUnsIntegerMethod Detail |
public long getValue()
public java.lang.String toString()
toString
in class AsnObject
protected long bytesToLong(byte[] data) throws java.io.IOException
data
- the array of bytes
java.io.IOException
public boolean equals(java.lang.Object obj)
true
if and only if the argument is not
null
and is an AsnUnsInteger
object that
contains the same long
value as this object.
equals
in class java.lang.Object
obj
- the object to compare with.
true
if the objects are the same;
false
otherwise.public int hashCode()
AsnUnsInteger
.
hashCode
in class java.lang.Object
long
value represented
by this AsnUnsInteger
object.
|
SNMP Stack 5_1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |