Skip navigation links

Oracle Fusion Middleware Security Engine Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10674-03


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, java.security.cert.X509Extension, 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, java.security.cert.X509Extension

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.List<X509Extension> exts)
          Create a new X509ExtensionSet containing the X509Extensionss in the given vector.
X509ExtensionSet(java.util.Vector<X509Extension> exts)
          Deprecated. Use X509ExtensionSet(List)

 

Method Summary
 X509Extension addExtension(X509Extension ext)
          Add an extension to this extension set.
 java.util.Set<java.lang.String> getCriticalExtensionOIDs()
           
 X509Extension getExtension(oracle.security.crypto.asn1.ASN1ObjectID type)
          Returns the extension with the given type.
 java.util.Vector<X509Extension> getExtensions()
          Deprecated. Use getExtensionsAsList()
 java.util.ArrayList<X509Extension> getExtensionsAsList()
          Returns a list of all the extensions contained in this X509ExtensionSet.
 java.util.Map<oracle.security.crypto.asn1.ASN1ObjectID,X509Extension> getExtensionsAsMap()
           
 byte[] getExtensionValue(java.lang.String oid)
           
 java.util.Set<java.lang.String> getNonCriticalExtensionOIDs()
           
 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.
 boolean hasUnsupportedCriticalExtension()
           
 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<oracle.security.crypto.asn1.ASN1ObjectID> types()
          Deprecated. Use getExtensionsAsMap()
 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<X509Extension> exts)
Deprecated. Use X509ExtensionSet(List)
Create a new X509ExtensionSet containing the X509Extensionss in the given vector.

X509ExtensionSet

public X509ExtensionSet(java.util.List<X509Extension> 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<oracle.security.crypto.asn1.ASN1ObjectID> types()
Deprecated. Use getExtensionsAsMap()
Returns an enumeration of the types of all the extensions contained in this X509ExtensionSet.
Returns:
an Enumeration of ASN1ObjectID.

getExtensionsAsMap

public java.util.Map<oracle.security.crypto.asn1.ASN1ObjectID,X509Extension> getExtensionsAsMap()

getExtensions

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

getExtensionsAsList

public java.util.ArrayList<X509Extension> getExtensionsAsList()
Returns a list of all the extensions contained in this X509ExtensionSet.
Returns:
a List 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

getCriticalExtensionOIDs

public java.util.Set<java.lang.String> getCriticalExtensionOIDs()
Specified by:
getCriticalExtensionOIDs in interface java.security.cert.X509Extension

getExtensionValue

public byte[] getExtensionValue(java.lang.String oid)
Specified by:
getExtensionValue in interface java.security.cert.X509Extension

getNonCriticalExtensionOIDs

public java.util.Set<java.lang.String> getNonCriticalExtensionOIDs()
Specified by:
getNonCriticalExtensionOIDs in interface java.security.cert.X509Extension

hasUnsupportedCriticalExtension

public boolean hasUnsupportedCriticalExtension()
Specified by:
hasUnsupportedCriticalExtension in interface java.security.cert.X509Extension

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 Fusion Middleware Security Engine Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10674-03


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