|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.protocols.asn1.ASN1Element
org.opends.server.protocols.asn1.ASN1Sequence
@PublicAPI(stability=UNCOMMITTED, mayInstantiate=true, mayExtend=false, mayInvoke=true) public final class ASN1Sequence
This class defines the data structures and methods to use when interacting with ASN.1 sequence elements.
Constructor Summary | |
---|---|
ASN1Sequence()
Creates a new ASN.1 sequence element with the default type no value. |
|
ASN1Sequence(java.util.ArrayList<ASN1Element> elements)
Creates a new ASN.1 sequence with the default type and the provided set of elements. |
|
ASN1Sequence(byte type)
Creates a new ASN.1 sequence element with the specified type and no value. |
|
ASN1Sequence(byte type,
java.util.ArrayList<ASN1Element> elements)
Creates a new ASN.1 sequence with the specified 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[] encodedElement)
Decodes the provided byte array as an ASN.1 sequence element. |
static ASN1Sequence |
decodeAsSequence(byte type,
byte[] encodedValue)
Decodes the provided information as an ASN.1 sequence. |
java.util.ArrayList<ASN1Element> |
elements()
Retrieves the set of elements contained in this ASN.1 sequence. |
void |
setElements(java.util.ArrayList<ASN1Element> elements)
Specifies the set of elements for this ASN.1 sequence. |
void |
setValue(byte[] value)
Specifies the value for this ASN.1 sequence element. |
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this ASN.1 sequence element to the provided buffer. |
void |
toString(java.lang.StringBuilder buffer,
int indent)
Appends a string representation of this protocol element to the provided buffer. |
Methods inherited from class org.opends.server.protocols.asn1.ASN1Element |
---|
decode, decode, decodeAsBoolean, decodeAsEnumerated, decodeAsInteger, decodeAsLong, decodeAsNull, decodeAsOctetString, decodeAsSequence, decodeAsSet, decodeElements, encode, encodeLength, encodeLongValue, encodeValue, encodeValue, encodeValue, equals, equalsElement, equalsIgnoreType, equalsIgnoreType, getProtocolElementName, getType, hashCode, isApplicationSpecific, isConstructed, isContextSpecific, isPrimitive, isPrivate, isUniversal, setType, setValueInternal, toString, value |
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 for this ASN.1 sequence.public ASN1Sequence(java.util.ArrayList<ASN1Element> elements)
elements
- The set of elements to include in this sequence.public ASN1Sequence(byte type, java.util.ArrayList<ASN1Element> elements)
type
- The BER type for this sequence.elements
- The set of elements to include in this sequence.Method Detail |
---|
public java.util.ArrayList<ASN1Element> elements()
public void setElements(java.util.ArrayList<ASN1Element> elements)
elements
- The set of elements for this ASN.1 sequence.public void setValue(byte[] value) throws ASN1Exception
setValue
in class ASN1Element
value
- The encoded value for this ASN.1 sequence element.
ASN1Exception
- If the provided array is null or cannot be decoded
as a set of ASN.1 elements.public static ASN1Sequence decodeAsSequence(ASN1Element element) throws ASN1Exception
element
- The ASN.1 element to decode as a sequence element.
ASN1Exception
- If the provided ASN.1 element cannot be decoded as
a sequence element.public static ASN1Sequence decodeAsSequence(byte[] encodedElement) throws ASN1Exception
encodedElement
- The byte array to decode as an ASN.1 sequence
element.
ASN1Exception
- If the provided byte array cannot be decoded as an
ASN.1 sequence element.public static ASN1Sequence decodeAsSequence(byte type, byte[] encodedValue) throws ASN1Exception
type
- The BER type to use for the sequence.encodedValue
- The encoded value to decode as the set of elements
for the sequence.
ASN1Exception
- If the provided byte array cannot be decoded as an
ASN.1 sequence element.public void toString(java.lang.StringBuilder buffer)
toString
in interface ProtocolElement
toString
in class ASN1Element
buffer
- The buffer to which the information should be appended.public void toString(java.lang.StringBuilder buffer, int indent)
toString
in interface ProtocolElement
toString
in class ASN1Element
buffer
- The buffer into which the string representation should be
written.indent
- The number of spaces that should be used to indent the
resulting string representation.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |