Class Extensions
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.Vector<Extension>
-
- org.mozilla.jss.netscape.security.x509.Extensions
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<Extension>,java.util.Collection<Extension>,java.util.List<Extension>,java.util.RandomAccess,CertAttrSet
public class Extensions extends java.util.Vector<Extension> implements CertAttrSet
This class defines the Extensions attribute for the Certificate.- See Also:
CertAttrSet, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Extensions()Default constructor for the certificate attribute.Extensions(DerInputStream in)Create the object, decoding the values from the passed DER stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecode(java.io.InputStream in)Decode the extensions from the InputStream.voiddelete(java.lang.String name)Delete the attribute value.voidencode(java.io.OutputStream out)Encode the extensions in DER form to the stream.booleanequals(java.lang.Object obj)java.lang.Objectget(java.lang.String name)Get the attribute value.java.util.Enumeration<java.lang.String>getAttributeNames()Return an enumeration of names of attributes existing within this attribute.java.lang.StringgetName()Return the name of this attribute.inthashCode()voidparseExtension(Extension ext)voidset(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 org.mozilla.jss.netscape.security.x509.CertAttrSet
toString
-
-
-
-
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
-
NAME
public static final java.lang.String NAME
name- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Extensions
public Extensions()
Default constructor for the certificate attribute.
-
Extensions
public Extensions(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.IOExceptionDecode the extensions from the InputStream.- Specified by:
decodein interfaceCertAttrSet- 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.IOExceptionEncode the extensions in DER form to the stream.- Specified by:
encodein interfaceCertAttrSet- 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.IOExceptionSet the attribute value.- Specified by:
setin interfaceCertAttrSet- 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.IOExceptionGet the attribute value.- Specified by:
getin interfaceCertAttrSet- 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.IOExceptionDelete the attribute value.- Specified by:
deletein interfaceCertAttrSet- Parameters:
name- the extension name used in the lookup.- Throws:
java.io.IOException- if named extension is not found.
-
getAttributeNames
public java.util.Enumeration<java.lang.String> getAttributeNames()
Return an enumeration of names of attributes existing within this attribute.- Specified by:
getAttributeNamesin interfaceCertAttrSet- Returns:
- an enumeration of the attribute names.
-
getName
public java.lang.String getName()
Return the name of this attribute.- Specified by:
getNamein interfaceCertAttrSet- Returns:
- the name of this CertAttrSet.
-
hashCode
public int hashCode()
-
-