Class CertificateExtensions
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.Vector<Extension>
-
- org.mozilla.jss.netscape.security.x509.CertificateExtensions
-
- 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 CertificateExtensions extends java.util.Vector<Extension> implements CertAttrSet, java.io.Serializable
This class defines the Extensions attribute for the Certificate.- See Also:
CertAttrSet
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CertificateExtensions()
Default constructor for the certificate attribute.CertificateExtensions(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 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 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
-
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 interfaceCertAttrSet
- 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 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.IOException
Set the attribute value.- Specified by:
set
in 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.IOException
Get the attribute value.- Specified by:
get
in 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.IOException
Delete the attribute value.- Specified by:
delete
in interfaceCertAttrSet
- 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 interfaceCertAttrSet
- Returns:
- an enumeration of the attribute names.
-
getName
public java.lang.String getName()
Return the name of this attribute.- Specified by:
getName
in interfaceCertAttrSet
- Returns:
- the name of this CertAttrSet.
-
hashCode
public int hashCode()
-
-