Skip navigation links

Oracle Security Developer Tools Security Engine Java API Reference
11g (11.1.1)

E10674-02


oracle.security.crypto.cert
Class X509ExtensionSet

java.lang.Object
  extended by oracle.security.crypto.cert.X509ExtensionSet

All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, oracle.security.crypto.asn1.ASN1Object, oracle.security.crypto.util.Streamable

public class X509ExtensionSet
extends java.lang.Object
implements oracle.security.crypto.asn1.ASN1Object, java.io.Externalizable

A list of X.509 Extensions, as defined in RFC 2459.

The list has hashtable semantics in that at most one extension of a given type may be defined at any given time, but has vector semantics in that order of input is preserved.

See Also:
X509Extension, Serialized Form

Constructor Summary
X509ExtensionSet()
          Create a new, empty X509ExtensionSet.
X509ExtensionSet(java.io.InputStream is)
          Create a new X509ExtensionSet from the given input stream.
X509ExtensionSet(java.util.Vector exts)
          Create a new X509ExtensionSet containing the X509Extensionss in the given vector.

 

Method Summary
 X509Extension addExtension(X509Extension ext)
          Add an extension to this extension set.
 X509Extension getExtension(oracle.security.crypto.asn1.ASN1ObjectID type)
          Returns the extension with the given type.
 java.util.Vector getExtensions()
          Returns a vector of all the extensions contained in this X509ExtensionSet.
 boolean hasExtension(oracle.security.crypto.asn1.ASN1ObjectID type)
          Returns true if this X509ExtensionSet contains an extension of the given type, otherwise returns false.
 boolean hasUnrecognizedCriticalExtension()
          Returns true if this X509ExtensionSet contains a critical extension that is not recognized by this implementation.
 void input(java.io.InputStream is)
           
 int length()
          Returns the length in bytes of the ASN.1 representation of this X509ExtensionSet.
 void output(java.io.OutputStream os)
           
 void readExternal(java.io.ObjectInput is)
           
 int size()
          Returns the number of extensions in this X509ExtensionSet.
 java.lang.String toString()
           
 java.util.Enumeration types()
          Returns an enumeration of the types of all the extensions contained in this X509ExtensionSet.
 void writeExternal(java.io.ObjectOutput os)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

X509ExtensionSet

public X509ExtensionSet()
Create a new, empty X509ExtensionSet.

X509ExtensionSet

public X509ExtensionSet(java.util.Vector exts)
Create a new X509ExtensionSet containing the X509Extensionss in the given vector.

X509ExtensionSet

public X509ExtensionSet(java.io.InputStream is)
                 throws java.io.IOException
Create a new X509ExtensionSet from the given input stream.
Throws:
java.io.IOException

Method Detail

addExtension

public X509Extension addExtension(X509Extension ext)
Add an extension to this extension set.
Parameters:
ext - the X509Extension to add.

getExtension

public X509Extension getExtension(oracle.security.crypto.asn1.ASN1ObjectID type)
Returns the extension with the given type.
Parameters:
type - an OID specifying the extension.
Returns:
the extension with the given type, or null if not present in this set.

types

public java.util.Enumeration types()
Returns an enumeration of the types of all the extensions contained in this X509ExtensionSet.
Returns:
an Enumeration of ASN1ObjectID.

getExtensions

public java.util.Vector getExtensions()
Returns a vector of all the extensions contained in this X509ExtensionSet.
Returns:
a Vector of X509Extension.

size

public int size()
Returns the number of extensions in this X509ExtensionSet.

hasExtension

public boolean hasExtension(oracle.security.crypto.asn1.ASN1ObjectID type)
Returns true if this X509ExtensionSet contains an extension of the given type, otherwise returns false.
Parameters:
type - the OID of the extension.

hasUnrecognizedCriticalExtension

public boolean hasUnrecognizedCriticalExtension()
Returns true if this X509ExtensionSet contains a critical extension that is not recognized by this implementation.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

input

public void input(java.io.InputStream is)
           throws java.io.IOException
Specified by:
input in interface oracle.security.crypto.util.Streamable
Throws:
java.io.IOException

output

public void output(java.io.OutputStream os)
            throws java.io.IOException
Specified by:
output in interface oracle.security.crypto.util.Streamable
Throws:
java.io.IOException

length

public int length()
Returns the length in bytes of the ASN.1 representation of this X509ExtensionSet.
Specified by:
length in interface oracle.security.crypto.util.Streamable

writeExternal

public void writeExternal(java.io.ObjectOutput os)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput is)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

Skip navigation links

Oracle Security Developer Tools Security Engine Java API Reference
11g (11.1.1)

E10674-02


Copyright © 2005, 2009, Oracle. All rights reserved.