Top Description Fields Constructors Methods
org.bouncycastle.asn1

public Class DLSequence

extends ASN1Sequence
Class Inheritance
Imports
java.io.IOException

The DLSequence encodes a SEQUENCE using definite length form.

Field Summary

Modifier and TypeField and Description
private int
Inherited from org.bouncycastle.asn1.ASN1Sequence:
elementsTYPE

Constructor Summary

AccessConstructor and Description
public
DLSequence()

Create an empty sequence.

public
DLSequence(ASN1Encodable
the object to go in the sequence.
element
)

Create a sequence containing one object.

public
DLSequence(ASN1Encodable
the first object to go in the sequence.
element1
,
ASN1Encodable
the second object to go in the sequence.
element2
)

Create a sequence containing two objects.

public
DLSequence(ASN1EncodableVector
the vector of objects to make up the sequence.
elementVector
)

create a sequence containing a vector of objects.

public
DLSequence(ASN1Encodable[]
the array of objects to make up the sequence.
elements
)

create a sequence containing an array of objects.

pack-priv
DLSequence(ASN1Encodable[] elements, boolean clone)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
encode(ASN1OutputStream out, boolean withTag)

Implements abstract org.bouncycastle.asn1.ASN1Primitive.encode.

A note on the implementation:

As DL requires the constructed, definite-length model to be used for structured types, this varies slightly from the ASN.1 descriptions given.

pack-priv int
private int
pack-priv ASN1BitString
pack-priv ASN1External
pack-priv ASN1OctetString
pack-priv ASN1Set
pack-priv ASN1Primitive
toDLObject()

Overrides org.bouncycastle.asn1.ASN1Sequence.toDLObject.

Change current SEQUENCE object to be encoded as DLSequence.

Inherited from org.bouncycastle.asn1.ASN1Sequence:
asn1EqualsencodeConstructedgetConstructedBitStringsgetConstructedOctetStringsgetInstancegetInstancegetObjectAtgetObjectshashCodeiteratorparsersizetoArraytoArrayInternaltoDERObjecttoString

Field Detail

contentsLengthback to summary
private int contentsLength

Constructor Detail

DLSequenceback to summary
public DLSequence()

Create an empty sequence.

DLSequenceback to summary
public DLSequence(ASN1Encodable element)

Create a sequence containing one object.

Parameters
element:ASN1Encodable

the object to go in the sequence.

DLSequenceback to summary
public DLSequence(ASN1Encodable element1, ASN1Encodable element2)

Create a sequence containing two objects.

Parameters
element1:ASN1Encodable

the first object to go in the sequence.

element2:ASN1Encodable

the second object to go in the sequence.

DLSequenceback to summary
public DLSequence(ASN1EncodableVector elementVector)

create a sequence containing a vector of objects.

Parameters
elementVector:ASN1EncodableVector

the vector of objects to make up the sequence.

DLSequenceback to summary
public DLSequence(ASN1Encodable[] elements)

create a sequence containing an array of objects.

Parameters
elements:ASN1Encodable[]

the array of objects to make up the sequence.

DLSequenceback to summary
pack-priv DLSequence(ASN1Encodable[] elements, boolean clone)

Method Detail

encodeback to summary
pack-priv void encode(ASN1OutputStream out, boolean withTag) throws IOException

Implements abstract org.bouncycastle.asn1.ASN1Primitive.encode.

A note on the implementation:

As DL requires the constructed, definite-length model to be used for structured types, this varies slightly from the ASN.1 descriptions given. Rather than just outputting SEQUENCE, we also have to specify CONSTRUCTED, and the objects length.

encodedLengthback to summary
pack-priv int encodedLength(boolean withTag) throws IOException

Implements abstract org.bouncycastle.asn1.ASN1Primitive.encodedLength.

getContentsLengthback to summary
private int getContentsLength() throws IOException
toASN1BitStringback to summary
pack-priv ASN1BitString toASN1BitString()

Implements abstract org.bouncycastle.asn1.ASN1Sequence.toASN1BitString.

toASN1Externalback to summary
pack-priv ASN1External toASN1External()

Implements abstract org.bouncycastle.asn1.ASN1Sequence.toASN1External.

toASN1OctetStringback to summary
pack-priv ASN1OctetString toASN1OctetString()

Implements abstract org.bouncycastle.asn1.ASN1Sequence.toASN1OctetString.

toASN1Setback to summary
pack-priv ASN1Set toASN1Set()

Implements abstract org.bouncycastle.asn1.ASN1Sequence.toASN1Set.

toDLObjectback to summary
pack-priv ASN1Primitive toDLObject()

Overrides org.bouncycastle.asn1.ASN1Sequence.toDLObject.

Doc from org.bouncycastle.asn1.ASN1Sequence.toDLObject.

Change current SEQUENCE object to be encoded as DLSequence. This is part of Direct Length form serialization.

Returns:ASN1Primitive

Doc from org.bouncycastle.asn1.ASN1Primitive.toDLObject.

a DL version of this.