|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.protocols.snmp.SnmpInt32
This class defines the SNMP 32-bit signed integer used by the SNMP SMI. This class also serves as a base class for any additional SNMP SMI types that exits now or may be defined in the future.
| Field Summary | |
static byte |
ASNTYPE
The ASN.1 type as defined by the SNMP SMI specification. |
| Constructor Summary | |
SnmpInt32()
Default constructor. |
|
SnmpInt32(int value)
Constructs a SnmpInt32 object with the passed value. |
|
SnmpInt32(java.lang.Integer value)
Constructs a SnmpInt32 object with the specified value. |
|
SnmpInt32(SnmpInt32 second)
Class copy constructor. |
|
SnmpInt32(java.lang.String value)
Simple class constructor that attempts to parse the passed string into a valid integer value. |
|
| Method Summary | |
java.lang.Object |
clone()
Returns a duplicate of the current object. |
int |
decodeASN(byte[] buf,
int offset,
org.opennms.protocols.snmp.asn1.AsnEncoder encoder)
Used to decode the integer value from the ASN.1 buffer. |
SnmpSyntax |
duplicate()
Returns a duplicate of the current object. |
int |
encodeASN(byte[] buf,
int offset,
org.opennms.protocols.snmp.asn1.AsnEncoder encoder)
Used to encode the integer value into an ASN.1 buffer. |
int |
getValue()
Used to access the internal 32-bit signed quantity. |
void |
setValue(int value)
Used to set the 32-bit signed quantity |
void |
setValue(java.lang.Integer value)
Used to set the 32-bit signed quantity |
java.lang.String |
toString()
Returns the string representation of the object. |
byte |
typeId()
Used to retreive the ASN.1 type for this object. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final byte ASNTYPE
| Constructor Detail |
public SnmpInt32()
public SnmpInt32(int value)
value - The 32-bit signed integer value for the object.public SnmpInt32(java.lang.Integer value)
value - An Integer object containing the 32-bte value.public SnmpInt32(SnmpInt32 second)
second - The object to get the value from.public SnmpInt32(java.lang.String value)
value - The integer value represented as a String
java.lang.NumberFormatException - Thrown if the passed value
cannot be turned into a valid integer.
java.lang.NullPointerException - Thrown if the passed string
is a null reference.| Method Detail |
public int getValue()
public void setValue(int value)
value - The new value for the object.public void setValue(java.lang.Integer value)
value - The new value for the objectpublic byte typeId()
typeId in interface SnmpSyntax
public int encodeASN(byte[] buf,
int offset,
org.opennms.protocols.snmp.asn1.AsnEncoder encoder)
throws org.opennms.protocols.snmp.asn1.AsnEncodingException
encodeASN in interface SnmpSyntaxbuf - The location to write the encoded dataoffset - The start of the encoded buffer.encoder - The ASN.1 encoder object
org.opennms.protocols.snmp.asn1.AsnEncodingException - Thrown if an encoding error occurs
public int decodeASN(byte[] buf,
int offset,
org.opennms.protocols.snmp.asn1.AsnEncoder encoder)
throws org.opennms.protocols.snmp.asn1.AsnDecodingException
decodeASN in interface SnmpSyntaxbuf - The encoded ASN.1 dataoffset - The offset of the first byte of dataencoder - The ASN.1 decoder object.
org.opennms.protocols.snmp.asn1.AsnDecodingException - Thrown if an encoding error occurspublic SnmpSyntax duplicate()
duplicate in interface SnmpSyntaxpublic java.lang.Object clone()
public java.lang.String toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||