Oracle Security Developer Tools Security Engine Java API Reference
10g (10.1.4.0.1)

B28175-01


oracle.security.crypto.cert
Class AttributeTypeAndValueList

java.lang.Object
  extended byoracle.security.crypto.cert.AttributeTypeAndValueList

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

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

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.

The order in which elements are added is retained by the elements() and elementAt(int) methods which have Vector semantics, but not by the types() method which has Hashtable semantics.


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 elements()
           
 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)
           
 int size()
           
 java.lang.String toString()
           
 java.util.Enumeration types()
          Returns an enumeration consisting of all the type OIDs defined in this attribute list.

 

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

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

public java.util.Enumeration types()
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()

toString

public java.lang.String toString()

elements

public java.util.Vector elements()

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

Oracle Security Developer Tools Security Engine Java API Reference
10g (10.1.4.0.1)

B28175-01


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