SourceForge.net Logo

org.netsnmp
Class ASN_TYPE

java.lang.Object
  |
  +--org.netsnmp.ASN_TYPE
Direct Known Subclasses:
ASN_TYPE.asn_bit_str, ASN_TYPE.asn_boolean, ASN_TYPE.asn_counter, ASN_TYPE.asn_counter64, ASN_TYPE.asn_gauge, ASN_TYPE.asn_integer, ASN_TYPE.asn_ipaddress, ASN_TYPE.asn_null, ASN_TYPE.asn_object_id, ASN_TYPE.asn_octet_str, ASN_TYPE.asn_sequence, ASN_TYPE.asn_timeticks, ASN_TYPE.asn_unsigned

public class ASN_TYPE
extends Object

typesafe enum pattern class for ASN_TYPES from Effective Java

Author:
Andrew E. Page aepage@users.sourceforge.net

Nested Class Summary
static class ASN_TYPE.asn_bit_str
           
static class ASN_TYPE.asn_boolean
           
static class ASN_TYPE.asn_counter
           
static class ASN_TYPE.asn_counter64
           
static class ASN_TYPE.asn_gauge
           
static class ASN_TYPE.asn_integer
           
static class ASN_TYPE.asn_ipaddress
           
static class ASN_TYPE.asn_null
           
static class ASN_TYPE.asn_object_id
           
static class ASN_TYPE.asn_octet_str
           
static class ASN_TYPE.asn_sequence
           
static class ASN_TYPE.asn_timeticks
           
static class ASN_TYPE.asn_unsigned
           
 
Field Summary
static byte ASN_APPLICATION
           
static ASN_TYPE ASN_BIT_STR
           
static ASN_TYPE ASN_BOOLEAN
           
static ASN_TYPE ASN_COUNTER
           
static ASN_TYPE ASN_COUNTER64
           
static ASN_TYPE ASN_GAUGE
           
static ASN_TYPE ASN_INTEGER
           
static ASN_TYPE ASN_IPADDRESS
           
static ASN_TYPE ASN_NULL
           
static ASN_TYPE ASN_OBJECT_ID
           
static ASN_TYPE ASN_OCTET_STR
           
static ASN_TYPE ASN_SEQUENCE
           
static ASN_TYPE ASN_TIMETICKS
           
static ASN_TYPE ASN_UNSIGNED
           
static ASN_TYPE[] lookup_table
           
 String name
          Creates a new instance of ASN_TYPE
 byte value
           
 
Method Summary
static ASN_TYPE intToType(int t)
           
 boolean toBoolean(byte[] data)
           
 byte toByte()
           
 int toInt(byte[] data)
           
 long toInt64(byte[] data)
           
 String toString()
           
 String toString(byte[] data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public final String name
Creates a new instance of ASN_TYPE


value

public final byte value

lookup_table

public static ASN_TYPE[] lookup_table

ASN_APPLICATION

public static final byte ASN_APPLICATION
See Also:
Constant Field Values

ASN_BOOLEAN

public static final ASN_TYPE ASN_BOOLEAN

ASN_INTEGER

public static final ASN_TYPE ASN_INTEGER

ASN_BIT_STR

public static final ASN_TYPE ASN_BIT_STR

ASN_OCTET_STR

public static final ASN_TYPE ASN_OCTET_STR

ASN_NULL

public static final ASN_TYPE ASN_NULL

ASN_OBJECT_ID

public static final ASN_TYPE ASN_OBJECT_ID

ASN_SEQUENCE

public static final ASN_TYPE ASN_SEQUENCE

ASN_IPADDRESS

public static final ASN_TYPE ASN_IPADDRESS

ASN_COUNTER

public static final ASN_TYPE ASN_COUNTER

ASN_GAUGE

public static final ASN_TYPE ASN_GAUGE

ASN_UNSIGNED

public static final ASN_TYPE ASN_UNSIGNED

ASN_TIMETICKS

public static final ASN_TYPE ASN_TIMETICKS

ASN_COUNTER64

public static final ASN_TYPE ASN_COUNTER64
Method Detail

intToType

public static ASN_TYPE intToType(int t)

toBoolean

public boolean toBoolean(byte[] data)
                  throws NetSNMPBadValue
NetSNMPBadValue

toInt

public int toInt(byte[] data)
          throws NetSNMPBadValue
NetSNMPBadValue

toInt64

public long toInt64(byte[] data)
             throws NetSNMPBadValue
NetSNMPBadValue

toString

public String toString(byte[] data)
                throws NetSNMPBadValue
NetSNMPBadValue

toString

public String toString()
Overrides:
toString in class Object

toByte

public byte toByte()

SourceForge.net Logo