Top Description Fields Constructors Methods
org.bouncycastle.asn1

public Class DERSequence

extends ASN1Sequence
Class Inheritance
Imports
java.io.IOException, java.util.Enumeration

Definite length SEQUENCE, encoding tells explicit number of bytes that the content of this sequence occupies.

For X.690 syntax rules, see ASN1Sequence.

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
DERSequence()

Create an empty sequence

public
DERSequence(ASN1Encodable
the object to go in the sequence.
obj
)

Create a sequence containing one object

public
DERSequence(ASN1EncodableVector
the vector of objects to make up the sequence.
v
)

Create a sequence containing a vector of objects.

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

Create a sequence containing an array of objects.

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv int
encodedLength()

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

Return the length of the encoding this object will produce.
private int
Inherited from org.bouncycastle.asn1.ASN1Sequence:
asn1EqualsgetInstancegetInstancegetObjectAtgetObjectshashCodeisConstructediteratorparsersizetoArraytoDERObjecttoDLObjecttoString

Field Detail

bodyLengthback to summary
private int bodyLength

Constructor Detail

DERSequenceback to summary
public DERSequence()

Create an empty sequence

DERSequenceback to summary
public DERSequence(ASN1Encodable obj)

Create a sequence containing one object

Parameters
obj:ASN1Encodable

the object to go in the sequence.

DERSequenceback to summary
public DERSequence(ASN1EncodableVector v)

Create a sequence containing a vector of objects.

Parameters
v:ASN1EncodableVector

the vector of objects to make up the sequence.

DERSequenceback to summary
public DERSequence(ASN1Encodable[] array)

Create a sequence containing an array of objects.

Parameters
array:ASN1Encodable[]

the array of objects to make up the sequence.

Method Detail

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

Implements abstract org.bouncycastle.asn1.ASN1Sequence.encode.

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

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

Doc from org.bouncycastle.asn1.ASN1Primitive.encodedLength.

Return the length of the encoding this object will produce.

Returns:int

the length of the object's encoding.

Exceptions
IOException:
if the encoding length cannot be calculated.
getBodyLengthback to summary
private int getBodyLength() throws IOException