uk.co.westhawk.snmp.stack
Class  AsnUnsInteger64
java.lang.Object
  |
  +--uk.co.westhawk.snmp.stack.AsnObject
        |
        +--uk.co.westhawk.snmp.stack.AsnUnsInteger64
- All Implemented Interfaces: 
 - SnmpConstants
 
- public class AsnUnsInteger64
- extends AsnObject
  
This class represents ASN.1 64-bit unsigned integer. It is used for
 COUNTER64.
- Version: 
 - $Revision: 3.11 $ $Date: 2002/10/10 15:13:57 $
 
- Author: 
 - Tim Panton
 
| 
Field Summary | 
protected  long | 
value
 
            | 
 
 
| Fields inherited from interface uk.co.westhawk.snmp.stack.SnmpConstants | 
ASN_APPLICATION, ASN_BIT_STR, ASN_BIT8, ASN_BOOLEAN, ASN_CONSTRUCTOR, ASN_CONTEXT, ASN_EXTENSION_ID, ASN_INTEGER, ASN_LONG_LEN, ASN_NULL, ASN_OBJECT_ID, ASN_OCTET_STR, ASN_PRIMITIVE, ASN_PRIVATE, ASN_SEQUENCE, ASN_SET, ASN_UNIVERSAL, CONS_SEQ, COUNTER, COUNTER64, GAUGE, GET_REQ_MSG, GET_RPRT_MSG, GET_RSP_MSG, GETBULK_REQ_MSG, GETNEXT_REQ_MSG, INFORM_REQ_MSG, INTEGER, IPADDRESS, NSAP_ADDRESS, NULLOBJ, OBJID, OPAQUE, SET_REQ_MSG, SNMP_ERR_AUTHORIZATIONERR, SNMP_ERR_BADVALUE, SNMP_ERR_COMMITFAILED, SNMP_ERR_DECODING_EXC, SNMP_ERR_DECODINGASN_EXC, SNMP_ERR_DECODINGPKTLNGTH_EXC, SNMP_ERR_GENERR, SNMP_ERR_INCONSISTENTNAME, SNMP_ERR_INCONSISTENTVALUE, SNMP_ERR_NOACCESS, SNMP_ERR_NOCREATION, SNMP_ERR_NOERROR, SNMP_ERR_NOSUCHNAME, SNMP_ERR_NOTWRITABLE, SNMP_ERR_READONLY, SNMP_ERR_RESOURCEUNAVAILABLE, SNMP_ERR_TOOBIG, SNMP_ERR_UNDOFAILED, SNMP_ERR_WRONGENCODING, SNMP_ERR_WRONGLENGTH, SNMP_ERR_WRONGTYPE, SNMP_ERR_WRONGVALUE, SNMP_TRAP_AUTHFAIL, SNMP_TRAP_COLDSTART, SNMP_TRAP_EGPNEIGHBORLOSS, SNMP_TRAP_ENTERPRISESPECIFIC, SNMP_TRAP_LINKDOWN, SNMP_TRAP_LINKUP, SNMP_TRAP_WARMSTART, SNMP_VAR_ENDOFMIBVIEW, SNMP_VAR_NOSUCHINSTANCE, SNMP_VAR_NOSUCHOBJECT, SNMP_VERSION_1, SNMP_VERSION_2c, SNMP_VERSION_3, STRING, TIMETICKS, TRP_REQ_MSG, TRPV2_REQ_MSG, UINTEGER32, version_id | 
 
 
| 
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 AsnUnsInteger64. | 
 int | 
hashCode()
 
          Returns a hash code for this AsnUnsInteger64. | 
 java.lang.String | 
toString()
 
          Returns the string representation of the AsnUnsInteger64. | 
 
 
| Methods inherited from class java.lang.Object | 
clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
 
value
protected long value
AsnUnsInteger64
public AsnUnsInteger64(long v)
- Constructor.
- Parameters:
 v - The value of the AsnUnsInteger64
 
 
AsnUnsInteger64
public AsnUnsInteger64(java.io.InputStream in,
                       int len)
                throws java.io.IOException
- Constructor.
- Parameters:
 in - The input stream from which the value should be readlen - The length of the AsnUnsInteger64
 
 
getValue
public long getValue()
- Returns the value representation of the AsnUnsInteger64.
- Returns:
 - The value of the AsnUnsInteger64
 
 
 
toString
public java.lang.String toString()
- Returns the string representation of the AsnUnsInteger64.
- Overrides:
 toString in class AsnObject
 
- Returns:
 - The string of the AsnUnsInteger64
 
 
 
bytesToLong
protected long bytesToLong(byte[] data)
                    throws java.io.IOException
- Changes an array of bytes into a long.
 Thanks to Julien Conan (jconan@protego.net) for improving 
 this method.
- Parameters:
 data - the array of bytes- Returns:
 - the int represenation of the array
 
 
 
equals
public boolean equals(java.lang.Object obj)
- Compares this object to the specified object.  The result is
 
true if and only if the argument is not
 null and is an AsnUnsInteger64 object that
 contains the same long value as this object.
- Overrides:
 equals in class java.lang.Object
 
- Parameters:
 obj - the object to compare with.- Returns:
 true if the objects are the same;
          false otherwise.
 
 
hashCode
public int hashCode()
- Returns a hash code for this 
AsnUnsInteger64.
- Overrides:
 hashCode in class java.lang.Object
 
- Returns:
 - a hash code value for this object, equal to the 
          hash of the primitive 
long value represented 
          by this AsnUnsInteger64 object.