|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.unboundid.asn1.ASN1Element
com.unboundid.asn1.ASN1Sequence
@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class ASN1Sequence
This class provides an ASN.1 sequence element, which is used to hold an ordered set of zero or more other elements (potentially including additional "envelope" element types like other sequences and/or sets).
Constructor Summary | |
---|---|
ASN1Sequence()
Creates a new ASN.1 sequence with the default BER type and no encapsulated elements. |
|
ASN1Sequence(ASN1Element... elements)
Creates a new ASN.1 sequence with the default BER type and the provided set of elements. |
|
ASN1Sequence(byte type)
Creates a new ASN.1 sequence with the specified BER type and no encapsulated elements. |
|
ASN1Sequence(byte type,
ASN1Element... elements)
Creates a new ASN.1 sequence with the specified BER type and the provided set of elements. |
|
ASN1Sequence(byte type,
java.util.Collection<? extends ASN1Element> elements)
Creates a new ASN.1 sequence with the specified BER type and the provided set of elements. |
|
ASN1Sequence(java.util.Collection<? extends ASN1Element> elements)
Creates a new ASN.1 sequence with the default BER type and the provided set of elements. |
Method Summary | |
---|---|
static ASN1Sequence |
decodeAsSequence(ASN1Element element)
Decodes the provided ASN.1 element as a sequence element. |
static ASN1Sequence |
decodeAsSequence(byte[] elementBytes)
Decodes the contents of the provided byte array as a sequence element. |
ASN1Element[] |
elements()
Retrieves the set of encapsulated elements held in this sequence. |
void |
encodeTo(ByteStringBuffer buffer)
Appends an encoded representation of this ASN.1 element to the provided buffer. |
byte[] |
getValue()
Retrieves the encoded value for this element. |
int |
getValueLength()
Retrieves the number of bytes contained in the value. |
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this ASN.1 element to the provided buffer. |
Methods inherited from class com.unboundid.asn1.ASN1Element |
---|
decode, decodeAsBoolean, decodeAsEnumerated, decodeAsInteger, decodeAsLong, decodeAsNull, decodeAsOctetString, decodeAsSequence, decodeAsSet, encode, encodeLength, equals, equalsIgnoreType, getType, hashCode, readFrom, readFrom, toString, writeTo |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ASN1Sequence()
public ASN1Sequence(byte type)
type
- The BER type to use for this element.public ASN1Sequence(ASN1Element... elements)
elements
- The set of elements to include in this sequence.public ASN1Sequence(java.util.Collection<? extends ASN1Element> elements)
elements
- The set of elements to include in this sequence.public ASN1Sequence(byte type, ASN1Element... elements)
type
- The BER type to use for this element.elements
- The set of elements to include in this sequence.public ASN1Sequence(byte type, java.util.Collection<? extends ASN1Element> elements)
type
- The BER type to use for this element.elements
- The set of elements to include in this sequence.Method Detail |
---|
public int getValueLength()
getValueLength
in class ASN1Element
public byte[] getValue()
getValue
in class ASN1Element
public void encodeTo(ByteStringBuffer buffer)
encodeTo
in class ASN1Element
buffer
- The buffer to which the encoded representation should be
appended.public ASN1Element[] elements()
public static ASN1Sequence decodeAsSequence(byte[] elementBytes) throws ASN1Exception
elementBytes
- The byte array to decode as an ASN.1 sequence
element.
ASN1Exception
- If the provided array cannot be decoded as a
sequence element.public static ASN1Sequence decodeAsSequence(ASN1Element element) throws ASN1Exception
element
- The ASN.1 element to be decoded.
ASN1Exception
- If the provided element cannot be decoded as a
sequence element.public void toString(java.lang.StringBuilder buffer)
toString
in class ASN1Element
buffer
- The buffer to which to append the information.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |