SET and SET OF constructs.Note
This does not know which syntax the set is! (The difference: ordering of SET elements or not ordering.)
DER form is always definite form length fields, while BER support uses indefinite form.
The CER form support does not exist.
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
8.12.1 The encoding of a set-of value shall be constructed.
8.12.2 The text of 8.10.2 applies: The contents octets shall consist of zero, one or more complete encodings of data values from the type listed in the ASN.1 definition.
8.12.3 The order of data values need not be preserved by the encoding and subsequent decoding.
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.
The encodings of the component values of a set-of value shall appear in ascending order, the encodings being compared as octet strings with the shorter components being padded at their trailing end with 0-octets.
NOTE — The padding octets are for comparison purposes only and do not appear in the encodings.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private Vector | |
| protected Vector |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | |
| protected | ASN1Set(ASN1EncodableVector
a vector of objects to make up the SET. v, boolean true if should be sorted DER style, false otherwise. doSort)Create a SET containing a vector of objects. |
| protected | ASN1Set(ASN1Encodable[]
an array of objects to make up the SET. array, boolean true if should be sorted DER style, false otherwise. doSort)Create a SET containing an array of objects. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv boolean | asn1Equals(ASN1Primitive o)
Implements abstract org. |
| pack-priv abstract void | |
| private byte[] | |
| public static ASN1Set | Returns: an ASN1Set instance, or null.the object we want converted. obj)return an ASN1Set from the given object. |
| public static ASN1Set | Returns: an ASN1Set instance.the tagged object. obj, boolean true if the object is meant to be explicitly tagged
false otherwise. explicit)Return an ASN1 set from a tagged object. |
| private ASN1Encodable | |
| public ASN1Encodable | Returns: the object at the set position indicated by index.the set number (starting at zero) of the object index)return the object at the set position indicated by index. |
| public Enumeration | |
| public int | hashCode()
Implements abstract org. |
| pack-priv boolean | isConstructed()
Implements abstract org. |
| public Iterator | iterator()
Implements org. |
| private boolean | |
| public ASN1SetParser | |
| public int | |
| protected void | |
| public ASN1Encodable[] | |
| pack-priv ASN1Primitive | toDERObject()
Overrides org. DERSet.
|
| pack-priv ASN1Primitive | toDLObject()
Overrides org. DLSet.
|
| public String |
| isSorted | back to summary |
|---|---|
| private boolean isSorted | |
| set | back to summary |
|---|---|
| private Vector<E> set | |
| sortedElements | back to summary |
|---|---|
| protected Vector<E> sortedElements | |
| ASN1Set | back to summary |
|---|---|
| protected ASN1Set() | |
| ASN1Set | back to summary |
|---|---|
| protected ASN1Set(ASN1Encodable obj) Create a SET containing one object
| |
| ASN1Set | back to summary |
|---|---|
| protected ASN1Set(ASN1EncodableVector v, boolean doSort) Create a SET containing a vector of objects.
| |
| ASN1Set | back to summary |
|---|---|
| protected ASN1Set(ASN1Encodable[] array, boolean doSort) Create a SET containing an array of objects.
| |
| asn1Equals | back to summary |
|---|---|
| pack-priv boolean asn1Equals(ASN1Primitive o) Implements abstract org. Doc from org. Equality (similarity) comparison for two ASN1Primitive objects. | |
| encode | back to summary |
|---|---|
| pack-priv abstract void encode(ASN1OutputStream out) throws IOException Implements abstract org. | |
| getDEREncoded | back to summary |
|---|---|
| private byte[] getDEREncoded(ASN1Encodable obj) | |
| getInstance | back to summary |
|---|---|
| public static ASN1Set getInstance(Object obj) return an ASN1Set from the given object.
| |
| getInstance | back to summary |
|---|---|
| public static ASN1Set getInstance(ASN1TaggedObject obj, boolean explicit) Return an ASN1 set from a tagged object. There is a special case here, if an object appears to have been explicitly tagged on reading but we were expecting it to be implicitly tagged in the normal course of events it indicates that we lost the surrounding set - so we need to add it back (this will happen if the tagged object is a sequence that contains other sequences). If you are dealing with implicitly tagged sets you really should be using this method.
| |
| getNext | back to summary |
|---|---|
| private ASN1Encodable getNext(Enumeration<E> e) | |
| getObjectAt | back to summary |
|---|---|
| public ASN1Encodable getObjectAt(int index) return the object at the set position indicated by index.
| |
| getObjects | back to summary |
|---|---|
| public Enumeration | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Implements abstract org. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isConstructed | back to summary |
|---|---|
| pack-priv boolean isConstructed() Implements abstract org. Doc from org. Return true if this objected is a CONSTRUCTED one, false otherwise.
| |
| iterator | back to summary |
|---|---|
| public Iterator Implements org. Doc from org. Returns an iterator over a set of elements of type T.
| |
| lessThanOrEqual | back to summary |
|---|---|
| private boolean lessThanOrEqual(byte[] a, byte[] b) return true if a <= b (arrays are assumed padded with zeros). | |
| parser | back to summary |
|---|---|
| public ASN1SetParser parser() | |
| size | back to summary |
|---|---|
| public int size() return the number of objects in this set.
| |
| sort | back to summary |
|---|---|
| protected void sort() | |
| toArray | back to summary |
|---|---|
| public ASN1Encodable[] toArray() | |
| toDERObject | back to summary |
|---|---|
| pack-priv ASN1Primitive toDERObject() Overrides org. Change current SET object to be encoded as
| |
| toDLObject | back to summary |
|---|---|
| pack-priv ASN1Primitive toDLObject() Overrides org. Change current SET object to be encoded as
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
| |