public class DLSet extends ASN1Set
8.11.2 The contents octets shall consist of the complete encoding of a data value from each of the types listed in the ASN.1 definition of the set type, in an order chosen by the sender, unless the type was referenced with the keyword OPTIONAL or the keyword DEFAULT.
8.11.3 The encoding of a data value may, but need not, be present for a type which was referenced with the keyword OPTIONAL or the keyword DEFAULT.
NOTE — The order of data values in a set value is not significant, and places no constraints on the order during transfer
NOTE — Where a component of the set is an untagged choice type, the location of that component in the ordering will depend on the tag of the choice component being encoded.
Modifier and Type | Field and Description |
---|---|
private int |
bodyLength |
Constructor and Description |
---|
DLSet()
create an empty set
|
DLSet(ASN1Encodable obj) |
DLSet(ASN1Encodable[] a)
create a set from an array of objects.
|
DLSet(ASN1EncodableVector v) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
encode(ASN1OutputStream out)
A note on the implementation:
|
(package private) int |
encodedLength() |
private int |
getBodyLength() |
asn1Equals, getInstance, getInstance, getObjectAt, getObjects, hashCode, isConstructed, parser, size, sort, toArray, toDERObject, toDLObject, toString
equals, fromByteArray, toASN1Primitive
getEncoded, getEncoded, hasEncodedTagValue, toASN1Object
private int bodyLength
public DLSet()
public DLSet(ASN1Encodable obj)
obj
- - a single object that makes up the set.public DLSet(ASN1EncodableVector v)
v
- - a vector of objects making up the set.public DLSet(ASN1Encodable[] a)
private int getBodyLength() throws IOException
IOException
int encodedLength() throws IOException
encodedLength
in class ASN1Primitive
IOException
void encode(ASN1OutputStream out) throws IOException
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 SET, we also have to specify CONSTRUCTED, and the objects length.
encode
in class ASN1Set
IOException