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 Attribute

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

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

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

An attribute, as defined in X.501 and used in various PKIX and PKCS protocols, consists of a type (OID) and a set of 1 or more values defined by the given type.

  Attribute ::= SEQUENCE {
  type    AttributeType,
  values  SET (1..MAX) OF AttributeValue
  }
 
  AttributeType ::= OBJECT IDENTIFIER
 
  AttributeValue ::= ANY DEFINED BY AttributeType
 
See Also:
AttributeSet, AttributeTypeAndValue, Serialized Form

Constructor Summary
Attribute()
          Creates a new empty instance.
Attribute(oracle.security.crypto.asn1.ASN1ObjectID type)
          Creates a new Attribute of the specified type, with no values.
Attribute(oracle.security.crypto.asn1.ASN1ObjectID type, oracle.security.crypto.asn1.ASN1Object value)
          Creates a new Attribute of the specified type, with the specified (single) value.
Attribute(oracle.security.crypto.asn1.ASN1ObjectID type, java.util.List<? extends oracle.security.crypto.asn1.ASN1Object> values)
          Creates a new Attribute of the specified type, with the specified values.
Attribute(oracle.security.crypto.asn1.ASN1ObjectID type, java.util.Vector<? extends oracle.security.crypto.asn1.ASN1Object> values)
          Deprecated. use Attribute(ASN1ObjectID, List)
Attribute(java.io.InputStream is)
          Creates a new Attribute from the given input stream.

 

Method Summary
 void addValue(oracle.security.crypto.asn1.ASN1Object value)
           
 oracle.security.crypto.asn1.ASN1ObjectID getType()
           
 java.util.Vector<oracle.security.crypto.asn1.ASN1Object> getValues()
          Deprecated. 
 java.util.ArrayList<oracle.security.crypto.asn1.ASN1Object> getValuesAsList()
           
 void input(java.io.InputStream is)
           
 int length()
           
 void output(java.io.OutputStream os)
           
 void readExternal(java.io.ObjectInput is)
           
 void setValues(java.util.List<? extends oracle.security.crypto.asn1.ASN1Object> values)
           
 void setValues(java.util.Vector<? extends oracle.security.crypto.asn1.ASN1Object> values)
          Deprecated. Use setValues(List)
 int size()
          Returns the number of values defined for this Attribute.
 java.lang.String toString()
           
 java.util.Enumeration<oracle.security.crypto.asn1.ASN1Object> values()
          Deprecated. 
 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

Attribute

public Attribute()
Creates a new empty instance. This constructor is to be used with serialization or with the input method.

Attribute

public Attribute(oracle.security.crypto.asn1.ASN1ObjectID type)
Creates a new Attribute of the specified type, with no values.
Parameters:
type - OID specifiying the type of the attribute.

Attribute

public Attribute(oracle.security.crypto.asn1.ASN1ObjectID type,
                 oracle.security.crypto.asn1.ASN1Object value)
Creates a new Attribute of the specified type, with the specified (single) value.
Parameters:
type - OID specifiying the type of the attribute.
value - a value of the attribute.

Attribute

public Attribute(oracle.security.crypto.asn1.ASN1ObjectID type,
                 java.util.Vector<? extends oracle.security.crypto.asn1.ASN1Object> values)
Deprecated. use Attribute(ASN1ObjectID, List)
Creates a new Attribute of the specified type, with the specified values.
Parameters:
type - OID specifiying the type of the attribute.
values - a vector containing 1 or more ASN1Object values for the attribute.

Attribute

public Attribute(oracle.security.crypto.asn1.ASN1ObjectID type,
                 java.util.List<? extends oracle.security.crypto.asn1.ASN1Object> values)
Creates a new Attribute of the specified type, with the specified values.
Parameters:
type - OID specifiying the type of the attribute.
values - a vector containing 1 or more ASN1Object values for the attribute.

Attribute

public Attribute(java.io.InputStream is)
          throws java.io.IOException
Creates a new Attribute from the given input stream.
Parameters:
is - input stream containing the encoding of the attribute.
Throws:
java.io.IOException

Method Detail

getType

public oracle.security.crypto.asn1.ASN1ObjectID getType()

addValue

public void addValue(oracle.security.crypto.asn1.ASN1Object value)

setValues

public void setValues(java.util.Vector<? extends oracle.security.crypto.asn1.ASN1Object> values)
Deprecated. Use setValues(List)

setValues

public void setValues(java.util.List<? extends oracle.security.crypto.asn1.ASN1Object> values)

values

@Deprecated
public java.util.Enumeration<oracle.security.crypto.asn1.ASN1Object> values()
Deprecated. 
Returns the set of values for this Attribute.
Returns:
an Enumeration of the ASN1Object values.

getValues

@Deprecated
public java.util.Vector<oracle.security.crypto.asn1.ASN1Object> getValues()
Deprecated. 

getValuesAsList

public java.util.ArrayList<oracle.security.crypto.asn1.ASN1Object> getValuesAsList()

size

public int size()
Returns the number of values defined for this Attribute.

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