|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.adventnet.snmp.snmp2.ASNTypes
Container for ASN utility Functions and Parameters. API Users will not need to use this class directly. This class has all it's methods and variables static and does not need to be instantiated.
| Field Summary | |
(package private) static byte |
ASN_APPLICATION
|
(package private) static byte |
ASN_BIT_STR
|
(package private) static byte |
ASN_BIT8
|
(package private) static byte |
ASN_BOOLEAN
|
(package private) static byte |
ASN_CONSTRUCTOR
|
(package private) static byte |
ASN_CONTEXT
|
(package private) static int |
ASN_EXCEPTION
|
(package private) static byte |
ASN_EXTENSION_ID
|
(package private) static byte |
ASN_INTEGER
|
(package private) static byte |
ASN_LONG_LEN
|
(package private) static byte |
ASN_NULL
|
(package private) static byte |
ASN_OBJECT_ID
|
(package private) static byte |
ASN_OCTET_STR
|
(package private) static byte |
ASN_PRIMITIVE
|
(package private) static byte |
ASN_PRIVATE
|
(package private) static byte |
ASN_SEQUENCE
|
(package private) static byte |
ASN_SET
|
(package private) static byte |
ASN_UNIVERSAL
|
(package private) static int |
MAX_OID_LEN
|
(package private) static int |
MAX_SUBID
|
| Constructor Summary | |
(package private) |
ASNTypes()
|
| Method Summary | |
(package private) static int |
byteToInt(byte b)
Since JAVA does not support unsigned types, we need a converter from unsigned byte to int that preserves the last 8 bits. |
(package private) static int |
encodeInt(byte[] buff,
int space,
int value,
int id)
Encodes a signed 32-bit integer with the specified id (tag). |
(package private) static int |
encodeInt(byte[] buff,
int space,
long value,
int id)
Encodes a signed 64-bit integer with the specified id (tag). |
(package private) static int |
encodeNull(byte[] buff,
int space,
int id)
Encodes a null value with the specified id (tag). |
(package private) static int |
encodeOctets(byte[] buff,
int space,
byte[] octets,
int offset,
int count,
int id)
Encodes an octet string with the specified id (tag). |
(package private) static int |
encodeOid(byte[] buff,
int space,
int[] oid,
int count,
int id)
Encodes an object identifier with the specified id (tag). |
(package private) static int |
encodeSequence(byte[] buff,
int space,
int length,
int id)
Encodes a Sequence or Sequence of with the specified id (tag). |
(package private) static int |
encodeString(byte[] buff,
int space,
java.lang.String string,
int offset,
int count,
int id)
Encodes n Java string with the specified id (tag). |
(package private) static int |
encodeUInt(byte[] buff,
int space,
int value,
int id)
Encodes an unsigned 32-bit integer with the specified id (tag). |
(package private) static int |
encodeUInt(byte[] buff,
int space,
long[] val,
int id)
Encodes an unsigned 64-bit integer with the specified id (tag). |
(package private) static byte[] |
encodeVariable(SnmpVar var)
This is a convenience routine used to get the encoding for an SnmpVar object. |
(package private) static boolean |
IS_CONSTRUCTOR(byte b)
|
(package private) static boolean |
IS_EXTENSION_ID(byte b)
|
| Methods inherited from class java.lang.Object |
|
| Field Detail |
static int MAX_SUBID
static int MAX_OID_LEN
static final byte ASN_BOOLEAN
static final byte ASN_INTEGER
static final byte ASN_BIT_STR
static final byte ASN_OCTET_STR
static final byte ASN_NULL
static final byte ASN_OBJECT_ID
static final byte ASN_SEQUENCE
static final byte ASN_SET
static final byte ASN_UNIVERSAL
static final byte ASN_APPLICATION
static final byte ASN_CONTEXT
static final byte ASN_PRIVATE
static final int ASN_EXCEPTION
static final byte ASN_PRIMITIVE
static final byte ASN_CONSTRUCTOR
static final byte ASN_LONG_LEN
static final byte ASN_EXTENSION_ID
static final byte ASN_BIT8
| Constructor Detail |
ASNTypes()
| Method Detail |
static int byteToInt(byte b)
b - the byte to convertstatic boolean IS_CONSTRUCTOR(byte b)
static boolean IS_EXTENSION_ID(byte b)
static int encodeInt(byte[] buff,
int space,
int value,
int id)
throws java.lang.ArrayIndexOutOfBoundsException
buff - The buffer into which the value is to be encodedspace - The number of free bytes in the buffervalue - The integer value to be encodedid - The ASN.1 BER id (or tag)
static int encodeInt(byte[] buff,
int space,
long value,
int id)
throws java.lang.ArrayIndexOutOfBoundsException
buff - The buffer into which the value is to be encodedspace - The number of free bytes in the buffervalue - The integer value to be encodedid - The ASN.1 BER id (or tag)
static int encodeUInt(byte[] buff,
int space,
int value,
int id)
throws java.lang.ArrayIndexOutOfBoundsException
buff - The buffer into which the value is to be encodedspace - The number of free bytes in the buffervalue - The unsigned integer value to be encodedid - The ASN.1 BER id (or tag)
static int encodeUInt(byte[] buff,
int space,
long[] val,
int id)
throws java.lang.ArrayIndexOutOfBoundsException
buff - The buffer into which the value is to be encodedspace - The number of free bytes in the buffervalue - The unsigned integer value to be encodedid - The ASN.1 BER id (or tag)
static int encodeOctets(byte[] buff,
int space,
byte[] octets,
int offset,
int count,
int id)
throws java.lang.ArrayIndexOutOfBoundsException
buff - The buffer into which the value is to be encodedspace - The number of free bytes in the bufferoctets - The octet string to be encoded (may be null)offset - The offset of the first byte of octets to be encodedcount - The number of bytes of octets to be encodedid - The ASN.1 BER id (or tag)
static int encodeString(byte[] buff,
int space,
java.lang.String string,
int offset,
int count,
int id)
throws java.lang.ArrayIndexOutOfBoundsException
buff - The buffer into which the value is to be encodedspace - The number of free bytes in the bufferstring - The Java string to be encoded (may be null)offset - The offset of the first char of octets to be encodedcount - The number of chars of octets to be encodedid - The ASN.1 BER id (or tag)
static int encodeOid(byte[] buff,
int space,
int[] oid,
int count,
int id)
throws java.lang.ArrayIndexOutOfBoundsException
buff - The buffer into which the value is to be encodedspace - The number of free bytes in the bufferoid - The object identifier to be encodedcount - The number of elements of oid to be encodedid - The ASN.1 BER id (or tag)
static int encodeNull(byte[] buff,
int space,
int id)
throws java.lang.ArrayIndexOutOfBoundsException
buff - The buffer into which the value is to be encodedspace - The number of free bytes in the bufferid - The ASN.1 BER id (or tag)
static int encodeSequence(byte[] buff,
int space,
int length,
int id)
throws java.lang.ArrayIndexOutOfBoundsException
buff - The buffer into which the value is to be encodedspace - The number of free bytes in the bufferlength - The length of the sequenceid - The ASN.1 BER id (or tag)static byte[] encodeVariable(SnmpVar var)
var - The SnmpVar objet which needs to be encoded.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||