|
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.AsnInteger
This class represents the ASN.1 32-bit signed integer
SnmpConstants.ASN_INTEGER
Field Summary | |
protected int |
value
The internal value of AsnInteger. |
Fields inherited from class uk.co.westhawk.snmp.stack.AsnObject |
contentsLength, debug, headerLength, isCorrect, startPos, type |
Constructor Summary | |
AsnInteger(java.io.InputStream in,
int len)
Constructor. |
|
AsnInteger(int v)
Constructor. |
Method Summary | |
protected int |
bytesToInteger(byte[] data)
Changes an array of bytes into an int. |
boolean |
equals(java.lang.Object obj)
Compares this object to the specified object. |
int |
getValue()
Returns the value. |
int |
hashCode()
Returns a hash code for this AsnInteger . |
java.lang.String |
toString()
Returns the string representation of the AsnInteger. |
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 int value
Constructor Detail |
public AsnInteger(int v)
v
- The value of the AsnIntegerpublic AsnInteger(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 AsnIntegerMethod Detail |
public int getValue()
public java.lang.String toString()
toString
in class AsnObject
protected int bytesToInteger(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 AsnInteger
object that
contains the same int
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()
AsnInteger
.
hashCode
in class java.lang.Object
int
value represented by this
AsnInteger
object.
|
SNMP Stack 5_1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |