Skip navigation links

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

E10674-05


oracle.security.crypto.cert
Class AttributeTypeAndValueList

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

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

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

A an ordered list of AttributeTypeAndValue pairs.

Only one AttributeTypeAndValue element with a given OID type may be present. Adding a second element with that OID results in the expulsion of the first such element.

See Also:
Serialized Form

Constructor Summary
AttributeTypeAndValueList()
          Creates a new, empty attribute list.
AttributeTypeAndValueList(java.io.InputStream is)
           

 

Method Summary
 AttributeTypeAndValue addAttribute(oracle.security.crypto.asn1.ASN1ObjectID type, oracle.security.crypto.asn1.ASN1Object value)
          Defines a new attribute type and value pair.
 AttributeTypeAndValue addAttribute(AttributeTypeAndValue attr)
          Adds an AttributeTypeAndValue to this AttributeTypeAndValueList, replacing any previously defined attribute for the given attribute's type.
 java.lang.Object clone()
           
 AttributeTypeAndValue elementAt(int n)
           
 java.util.Vector<AttributeTypeAndValue> elements()
          Deprecated. 
 java.util.ArrayList<AttributeTypeAndValue> elementsAsList()
           
 java.util.Map<oracle.security.crypto.asn1.ASN1ObjectID,AttributeTypeAndValue> elementsAsMap()
           
 AttributeTypeAndValue getAttribute(oracle.security.crypto.asn1.ASN1ObjectID type)
          Returns the attribute with the given OID.
 oracle.security.crypto.asn1.ASN1Object getAttributeValue(oracle.security.crypto.asn1.ASN1ObjectID type)
           
 boolean hasAttribute(oracle.security.crypto.asn1.ASN1ObjectID type)
          Returns true if this has an AttributeTypeAndValue with the specified type, otherwise returns false.
 void input(java.io.InputStream is)
           
 boolean isEmpty()
          Returns true if and only if this attribute list is empty.
 int length()
           
 void output(java.io.OutputStream os)
           
 void readExternal(java.io.ObjectInput is)
           
 int size()
           
 java.lang.String toString()
           
 java.util.Enumeration<oracle.security.crypto.asn1.ASN1ObjectID> types()
          Deprecated. 
 void writeExternal(java.io.ObjectOutput os)
           

 

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

 

Constructor Detail

AttributeTypeAndValueList

public AttributeTypeAndValueList()
Creates a new, empty attribute list.

AttributeTypeAndValueList

public AttributeTypeAndValueList(java.io.InputStream is)
                          throws java.io.IOException
Throws:
java.io.IOException

Method Detail

addAttribute

public AttributeTypeAndValue addAttribute(AttributeTypeAndValue attr)
Adds an AttributeTypeAndValue to this AttributeTypeAndValueList, replacing any previously defined attribute for the given attribute's type.
Parameters:
attr - the AttributeTypeAndValue to add.
Returns:
the previously-defined attribute for the given attribute's OID, or null if none was defined.

addAttribute

public AttributeTypeAndValue addAttribute(oracle.security.crypto.asn1.ASN1ObjectID type,
                                          oracle.security.crypto.asn1.ASN1Object value)
Defines a new attribute type and value pair.

getAttribute

public AttributeTypeAndValue getAttribute(oracle.security.crypto.asn1.ASN1ObjectID type)
Returns the attribute with the given OID.
Parameters:
type - the OID for the attribute to be retrieved.
Returns:
the attribute for the given type, or null if none is defined.

getAttributeValue

public oracle.security.crypto.asn1.ASN1Object getAttributeValue(oracle.security.crypto.asn1.ASN1ObjectID type)

isEmpty

public boolean isEmpty()
Returns true if and only if this attribute list is empty.

hasAttribute

public boolean hasAttribute(oracle.security.crypto.asn1.ASN1ObjectID type)
Returns true if this has an AttributeTypeAndValue with the specified type, otherwise returns false.

types

@Deprecated
public java.util.Enumeration<oracle.security.crypto.asn1.ASN1ObjectID> types()
Deprecated. 
Returns an enumeration consisting of all the type OIDs defined in this attribute list.

The elements of the returned enumeration will all have type ASN1ObjectID.


clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

toString

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

elements

@Deprecated
public java.util.Vector<AttributeTypeAndValue> elements()
Deprecated. 

elementsAsList

public java.util.ArrayList<AttributeTypeAndValue> elementsAsList()

elementsAsMap

public java.util.Map<oracle.security.crypto.asn1.ASN1ObjectID,AttributeTypeAndValue> elementsAsMap()

size

public int size()

elementAt

public AttributeTypeAndValue elementAt(int n)

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()
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-05


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