Class ASN1TypeCollection

    • Field Detail

      • OPTIONAL

        public final boolean[] OPTIONAL
      • DEFAULT

        public final Object[] DEFAULT
    • Constructor Detail

      • ASN1TypeCollection

        protected ASN1TypeCollection​(int tagNumber,
                                     ASN1Type[] type)
        Constructs ASN.1 collection type.
        Parameters:
        tagNumber - ASN.1 tag number
        type - a collection of one or more ASN.1 types.
        Throws:
        IllegalArgumentException - if tagNumber is invalid
    • Method Detail

      • setOptional

        protected final void setOptional​(int index)
        Sets a collection component as optional
        Parameters:
        index - an index of a component
      • setDefault

        protected final void setDefault​(Object object,
                                        int index)
        Sets a default value for a collection component. The component also became an optional component.
        Parameters:
        object - a component's default value
        index - an index of a component
      • getValues

        protected void getValues​(Object object,
                                 Object[] values)
        Provides an object's values to be encoded Derived classes should override this method to provide encoding for a selected class of objects. The default implementation throws RuntimeException.
        Parameters:
        object - an object to be encoded
        values - an array to store an object's values to be encoded