|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.protocols.snmp.SnmpNull
Implements the SNMP Null object as defined by the SNMPv1 and SNMPv2 SMI. The object has no data or length, but is encoded with a specific header. Often used as the value portion of an SnmpVarBind when sending a GET, GETNEXT, etc to a remote agent. This class manages no internal data, but is derived to provide the proper encoding and handling of SNMP Null datatypes.
Field Summary | |
static byte |
ASNTYPE
Defines the ASN.1 value for the SnmpNull class. |
(package private) static long |
serialVersionUID
Used to allow the serialization format to evolve. |
Constructor Summary | |
SnmpNull()
Constructs a default SnmpNull class |
|
SnmpNull(SnmpNull second)
Copy constructor. |
Method Summary | |
java.lang.Object |
clone()
Used to get a duplicate of the current object so that it can be modified without affecting the creating object. |
int |
decodeASN(byte[] buf,
int offset,
AsnEncoder encoder)
Used to decode the null value from the ASN.1 buffer. |
SnmpSyntax |
duplicate()
Used to get a duplicate of the current object so that it can be modified without affecting the creating object. |
int |
encodeASN(byte[] buf,
int offset,
AsnEncoder encoder)
Used to encode the null value into an ASN.1 buffer. |
java.lang.String |
toString()
Returns a string representation of the SNMP Null 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 |
static final long serialVersionUID
public static final byte ASNTYPE
Constructor Detail |
public SnmpNull()
public SnmpNull(SnmpNull second)
second
- The class object to set data from.Method Detail |
public byte typeId()
typeId
in interface SnmpSyntax
public int encodeASN(byte[] buf, int offset, AsnEncoder encoder) throws AsnEncodingException
encodeASN
in interface SnmpSyntax
buf
- The location to write the encoded dataoffset
- The start of the encoded buffer.encoder
- The ASN.1 encoder object
AsnEncodingException
- Thrown if an encoding error occurspublic int decodeASN(byte[] buf, int offset, AsnEncoder encoder) throws AsnDecodingException
decodeASN
in interface SnmpSyntax
buf
- The encoded ASN.1 dataoffset
- The offset of the first byte of dataencoder
- The ASN.1 decoder object.
AsnDecodingException
- Thrown if an encoding error occurspublic SnmpSyntax duplicate()
duplicate
in interface SnmpSyntax
public java.lang.Object clone()
public java.lang.String toString()
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |