Top Description Fields Constructors Methods
org.bouncycastle.asn1

public Class DERSet

extends ASN1Set
Class Inheritance
Imports
java.io.IOException

A DER encoded SET object

For X.690 syntax rules, see ASN1Set.

For short: Constructing this form does sort the supplied elements, and the sorting happens also before serialization (if necesssary). This is different from the way BERSet,DLSet does things.

Field Summary

Modifier and TypeField and Description
private int
Inherited from org.bouncycastle.asn1.ASN1Set:
elementssortedElementsTYPE

Constructor Summary

AccessConstructor and Description
public
DERSet()

create an empty set

public
DERSet(ASN1Encodable
the object to go in the set
element
)

create a set containing one object

public
DERSet(ASN1EncodableVector
the vector of objects to make up the set.
elementVector
)

create a set containing a vector of objects.

public
DERSet(ASN1Encodable[]
the array of objects to make up the set.
elements
)

create a set containing an array of objects.

pack-priv
DERSet(boolean isSorted, ASN1Encodable[] elements)

Method Summary

Modifier and TypeMethod and Description
private static boolean
checkSorted(boolean isSorted)

public static DERSet
pack-priv void
encode(ASN1OutputStream out, boolean withTag)

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

pack-priv int
private int
pack-priv ASN1Primitive
toDERObject()

Overrides org.bouncycastle.asn1.ASN1Set.toDERObject.

Change current SET object to be encoded as DERSet.
pack-priv ASN1Primitive
toDLObject()

Overrides org.bouncycastle.asn1.ASN1Set.toDLObject.

Change current SET object to be encoded as DLSet.
Inherited from org.bouncycastle.asn1.ASN1Set:
asn1EqualsencodeConstructedgetInstancegetInstancegetObjectAtgetObjectshashCodeiteratorparsersizetoArraytoString

Field Detail

contentsLengthback to summary
private int contentsLength

Constructor Detail

DERSetback to summary
public DERSet()

create an empty set

DERSetback to summary
public DERSet(ASN1Encodable element)

create a set containing one object

Parameters
element:ASN1Encodable

the object to go in the set

DERSetback to summary
public DERSet(ASN1EncodableVector elementVector)

create a set containing a vector of objects.

Parameters
elementVector:ASN1EncodableVector

the vector of objects to make up the set.

DERSetback to summary
public DERSet(ASN1Encodable[] elements)

create a set containing an array of objects.

Parameters
elements:ASN1Encodable[]

the array of objects to make up the set.

DERSetback to summary
pack-priv DERSet(boolean isSorted, ASN1Encodable[] elements)

Method Detail

checkSortedback to summary
private static boolean checkSorted(boolean isSorted)
convertback to summary
public static DERSet convert(ASN1Set set)
encodeback to summary
pack-priv void encode(ASN1OutputStream out, boolean withTag) throws IOException

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

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
toDERObjectback to summary
pack-priv ASN1Primitive toDERObject()

Overrides org.bouncycastle.asn1.ASN1Set.toDERObject.

Doc from org.bouncycastle.asn1.ASN1Set.toDERObject.

Change current SET object to be encoded as DERSet. This is part of Distinguished Encoding Rules form serialization.

Returns:ASN1Primitive

Doc from org.bouncycastle.asn1.ASN1Primitive.toDERObject.

a DER version of this.

toDLObjectback to summary
pack-priv ASN1Primitive toDLObject()

Overrides org.bouncycastle.asn1.ASN1Set.toDLObject.

Doc from org.bouncycastle.asn1.ASN1Set.toDLObject.

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

Returns:ASN1Primitive

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

a DL version of this.