|
|||||||||
| 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.ASN1Sequence
public class ASN1Sequence
This class defines an ASN.1 element that serves as a sequence, whose value is an ordered set of other ASN.1 elements.
| Field Summary | |
|---|---|
static ASN1Element[] |
NO_ELEMENTS
The set of elements that will be used if there are no elements. |
| 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 | |
|---|---|
ASN1Sequence()
Creates a new ASN.1 sequence with no elements encoded in the value. |
|
ASN1Sequence(java.util.ArrayList elements)
Creates a new ASN.1 sequence to hold the specified set of ASN.1 elements. |
|
ASN1Sequence(ASN1Element[] elements)
Creates a new ASN.1 sequence to hold the specified set of ASN.1 elements. |
|
ASN1Sequence(byte type)
Creates a new ASN.1 sequence with the specified type and no elements encoded in the value. |
|
ASN1Sequence(byte type,
java.util.ArrayList elements)
Creates a new ASN.1 sequence with the given type to hold the specified set of ASN.1 elements. |
|
ASN1Sequence(byte type,
ASN1Element[] elements)
Creates a new ASN.1 sequence with the given type to hold the specified set of ASN.1 elements. |
|
| Method Summary | |
|---|---|
void |
addElement(ASN1Element element)
Adds the specified ASN.1 element to the set of elements encoded in this sequence. |
static ASN1Sequence |
decodeAsSequence(byte[] encodedValue)
Decodes the provided byte array as an ASN.1 sequence element. |
static ASN1Element[] |
decodeSequenceElements(byte[] sequenceValue)
Decodes the provided byte array as if it were a set of ASN.1 elements. |
static ASN1Element[] |
decodeSequenceElements(byte[] sequenceValue,
int numElements)
Decodes the provided byte array into a set of the specified number of ASN.1 elements. |
ASN1Element[] |
getElements()
Retrieves the set of elements that are encoded in this ASN.1 sequence. |
void |
removeAllElements()
Removes all elements encoded in the value of this ASN.1 element. |
void |
replaceElements(ASN1Element element)
Replaces the current set of elements with the provided ASN.1 element. |
void |
replaceElements(ASN1Element[] elements)
Replaces the current set of elements with the provided set. |
java.lang.String |
toString(int indent)
Retrieves a string representation of this ASN.1 sequence. |
| Methods inherited from class com.sun.slamd.asn1.ASN1Element |
|---|
byteArrayToInt, byteArrayToString, byteArrayToString, byteArrayToStringWithASCII, byteArrayToStringWithASCII, decode, decodeAsBoolean, decodeAsBoolean, decodeAsEnumerated, decodeAsEnumerated, decodeAsInteger, decodeAsInteger, decodeAsNull, decodeAsNull, decodeAsOctetString, decodeAsOctetString, decodeAsSequence, decodeAsSet, decodeAsSet, decodeLength, encode, encode, encodeLength, getBytes, getType, getTypeWithoutFlags, getValue, setType, setValue, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final ASN1Element[] NO_ELEMENTS
| Constructor Detail |
|---|
public ASN1Sequence()
public ASN1Sequence(byte type)
type - The type to use for this ASN.1 sequence.public ASN1Sequence(ASN1Element[] elements)
elements - The set of ASN.1 elements to encode in the value of this
sequence.
public ASN1Sequence(byte type,
ASN1Element[] elements)
type - The type to use for this ASN.1 sequence.elements - The set of ASN.1 elements to encode in the value of this
sequence.public ASN1Sequence(java.util.ArrayList elements)
elements - The set of ASN.1 elements to encode in the value of this
sequence.
public ASN1Sequence(byte type,
java.util.ArrayList elements)
type - The type to use for this ASN.1 sequence.elements - The set of ASN.1 elements to encode in the value of this
sequence.| Method Detail |
|---|
public ASN1Element[] getElements()
public void addElement(ASN1Element element)
element - The ASN.1 element to include in the set of elements
encoded in this sequence.public void removeAllElements()
public void replaceElements(ASN1Element element)
element - The ASN.1 element to use to replace the existing set of
elements encoded in this sequence.public void replaceElements(ASN1Element[] elements)
elements - The set of ASN.1 elements to use to replace the existing
set of elements encoded in this sequence.
public static ASN1Sequence decodeAsSequence(byte[] encodedValue)
throws ASN1Exception
encodedValue - The encoded ASN.1 element.
ASN1Exception - If the provided byte array cannot be decoded as an
ASN.1 sequence element.
public static ASN1Element[] decodeSequenceElements(byte[] sequenceValue)
throws ASN1Exception
sequenceValue - The set of encoded ASN.1 elements.
ASN1Exception - If the provided byte array cannot be decoded into a
set of ASN.1 elements.
public static ASN1Element[] decodeSequenceElements(byte[] sequenceValue,
int numElements)
throws ASN1Exception
sequenceValue - The set of encoded ASN.1 elements.numElements - The number of elements to extract.
ASN1Exception - If the provided byte array cannot be decoded into a
set of ASN.1 elements.public java.lang.String toString(int indent)
toString in class ASN1Elementindent - The number of spaces to indent the information in the
returned string.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||