Class CertificateExtensions

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String IDENT
      Identifier for this attribute, to be used with the get, set, delete methods of Certificate, x509 type.
      static java.lang.String NAME
      name
      • Fields inherited from class java.util.Vector

        capacityIncrement, elementCount, elementData
      • Fields inherited from class java.util.AbstractList

        modCount
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void decode​(java.io.InputStream in)
      Decode the extensions from the InputStream.
      void decodeEx​(java.io.InputStream in)
      Decode the extensions from the InputStream.
      void delete​(java.lang.String name)
      Delete the attribute value.
      void encode​(java.io.OutputStream out)
      Encode the extensions in DER form to the stream.
      boolean equals​(java.lang.Object obj)  
      java.lang.Object get​(java.lang.String name)
      Get the attribute value.
      java.util.Enumeration<java.lang.String> getAttributeNames()
      Returns an enumeration of the names of the attributes existing within this attribute.
      java.util.Enumeration<Extension> getAttributes()
      Return an enumeration of names of attributes existing within this attribute.
      java.lang.String getName()
      Return the name of this attribute.
      java.util.Enumeration<java.lang.String> getNames()  
      int hashCode()  
      void parseExtension​(Extension ext)  
      void set​(java.lang.String name, java.lang.Object obj)
      Set the attribute value.
      • Methods inherited from class java.util.Vector

        add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, firstElement, forEach, get, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, toString, trimToSize
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, stream, toArray
    • Field Detail

      • IDENT

        public static final java.lang.String IDENT
        Identifier for this attribute, to be used with the get, set, delete methods of Certificate, x509 type.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CertificateExtensions

        public CertificateExtensions()
        Default constructor for the certificate attribute.
      • CertificateExtensions

        public CertificateExtensions​(DerInputStream in)
                              throws java.io.IOException
        Create the object, decoding the values from the passed DER stream.
        Parameters:
        in - the DerInputStream to read the Extension from.
        Throws:
        java.io.IOException - on decoding errors.
    • Method Detail

      • parseExtension

        public void parseExtension​(Extension ext)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • decode

        public void decode​(java.io.InputStream in)
                    throws java.io.IOException
        Decode the extensions from the InputStream.
        Specified by:
        decode in interface CertAttrSet
        Parameters:
        in - the InputStream to unmarshal the contents from.
        Throws:
        java.io.IOException - on decoding or validity errors.
      • decodeEx

        public void decodeEx​(java.io.InputStream in)
                      throws java.io.IOException
        Decode the extensions from the InputStream.
        Parameters:
        in - the InputStream to unmarshal the contents from.
        Throws:
        java.io.IOException - on decoding or validity errors.
      • encode

        public void encode​(java.io.OutputStream out)
                    throws java.security.cert.CertificateException,
                           java.io.IOException
        Encode the extensions in DER form to the stream.
        Specified by:
        encode in interface CertAttrSet
        Parameters:
        out - the DerOutputStream to marshal the contents to.
        Throws:
        java.security.cert.CertificateException - on encoding errors.
        java.io.IOException - on errors.
      • set

        public void set​(java.lang.String name,
                        java.lang.Object obj)
                 throws java.io.IOException
        Set the attribute value.
        Specified by:
        set in interface CertAttrSet
        Parameters:
        name - the extension name used in the cache.
        obj - the object to set.
        Throws:
        java.io.IOException - if the object could not be cached.
      • get

        public java.lang.Object get​(java.lang.String name)
                             throws java.io.IOException
        Get the attribute value.
        Specified by:
        get in interface CertAttrSet
        Parameters:
        name - the extension name used in the lookup.
        Throws:
        java.io.IOException - if named extension is not found.
      • delete

        public void delete​(java.lang.String name)
                    throws java.io.IOException
        Delete the attribute value.
        Specified by:
        delete in interface CertAttrSet
        Parameters:
        name - the extension name used in the lookup.
        Throws:
        java.io.IOException - if named extension is not found.
      • getNames

        public java.util.Enumeration<java.lang.String> getNames()
      • getAttributes

        public java.util.Enumeration<Extension> getAttributes()
        Return an enumeration of names of attributes existing within this attribute.
      • getAttributeNames

        public java.util.Enumeration<java.lang.String> getAttributeNames()
        Description copied from interface: CertAttrSet
        Returns an enumeration of the names of the attributes existing within this attribute.
        Specified by:
        getAttributeNames in interface CertAttrSet
        Returns:
        an enumeration of the attribute names.
      • getName

        public java.lang.String getName()
        Return the name of this attribute.
        Specified by:
        getName in interface CertAttrSet
        Returns:
        the name of this CertAttrSet.
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Collection<Extension>
        Specified by:
        hashCode in interface java.util.List<Extension>
        Overrides:
        hashCode in class java.util.Vector<Extension>
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface java.util.Collection<Extension>
        Specified by:
        equals in interface java.util.List<Extension>
        Overrides:
        equals in class java.util.Vector<Extension>