|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.slamd.asn1.ASN1Element
com.sun.slamd.asn1.ASN1Enumerated
public class ASN1Enumerated
This class defines an ASN.1 element that can hold an enumerated value. It behaves in all respects like an integer, with the exception that each value of an enumerated element has a particular meaning (application-specific or context-specific) associated with it.
| Field Summary |
|---|
| Fields inherited from class com.sun.slamd.asn1.ASN1Element |
|---|
ASN1_BOOLEAN_TYPE, ASN1_ENUMERATED_TYPE, ASN1_INTEGER_TYPE, ASN1_NULL_TYPE, ASN1_OCTET_STRING_TYPE, ASN1_SEQUENCE_TYPE, ASN1_SET_TYPE, EMPTY_BYTES |
| Constructor Summary | |
|---|---|
ASN1Enumerated(byte type,
int intValue)
Creates a new ASN.1 enumerated element with the specified type and value. |
|
ASN1Enumerated(int intValue)
Creates a new ASN.1 enumerated element with the specified value. |
|
| Method Summary | |
|---|---|
static ASN1Enumerated |
decodeAsEnumerated(byte[] encodedValue)
Decodes the provided byte array as an ASN.1 enumerated element. |
static byte[] |
encodeIntValue(int intValue)
Encodes the provided int value in the appropriate manner for an ASN.1 enumerated value. |
int |
getIntValue()
Retrieves the Java int value that corresponds to the value of this ASN.1 enumerated element. |
| Methods inherited from class com.sun.slamd.asn1.ASN1Element |
|---|
byteArrayToInt, byteArrayToString, byteArrayToString, byteArrayToStringWithASCII, byteArrayToStringWithASCII, decode, decodeAsBoolean, decodeAsBoolean, decodeAsEnumerated, decodeAsInteger, decodeAsInteger, decodeAsNull, decodeAsNull, decodeAsOctetString, decodeAsOctetString, decodeAsSequence, decodeAsSequence, decodeAsSet, decodeAsSet, decodeLength, encode, encode, encodeLength, getBytes, getType, getTypeWithoutFlags, getValue, setType, setValue, toString, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ASN1Enumerated(int intValue)
intValue - The Java int value to use in creating the ASN.1
enumerated element.
public ASN1Enumerated(byte type,
int intValue)
type - The type to use for this enumerated value.intValue - The Java int value to use in creating the ASN.1
enumerated value.| Method Detail |
|---|
public static byte[] encodeIntValue(int intValue)
intValue - The Java int value to encode as an ASN.1 enumerated
value.
public int getIntValue()
public static ASN1Enumerated decodeAsEnumerated(byte[] encodedValue)
throws ASN1Exception
encodedValue - The encoded ASN.1 element.
ASN1Exception - If the provided byte array cannot be decoded as an
ASN.1 enumerated element.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||