public class Attribute
extends java.lang.Object
implements oracle.security.crypto.asn1.ASN1Object, java.io.Externalizable
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
AttributeSet, AttributeTypeAndValue, Serialized Form| Constructor and Description |
|---|
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.
|
Attribute(java.io.InputStream is)
Creates a new
Attribute from the given input stream. |
| Modifier and Type | Method and Description |
|---|---|
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) |
public Attribute()
public Attribute(oracle.security.crypto.asn1.ASN1ObjectID type)
Attribute of the specified type, with no values.type - OID specifiying the type of the attribute.
public Attribute(oracle.security.crypto.asn1.ASN1ObjectID type,
oracle.security.crypto.asn1.ASN1Object value)
Attribute of the specified type, with the specified (single) value.type - OID specifiying the type of the attribute.value - a value of the attribute.
public Attribute(oracle.security.crypto.asn1.ASN1ObjectID type,
java.util.Vector<? extends oracle.security.crypto.asn1.ASN1Object> values)
Attribute(ASN1ObjectID, List)Attribute of the specified type, with the specified values.type - OID specifiying the type of the attribute.values - a vector containing 1 or more ASN1Object values for the attribute.
public Attribute(oracle.security.crypto.asn1.ASN1ObjectID type,
java.util.List<? extends oracle.security.crypto.asn1.ASN1Object> values)
Attribute of the specified type, with the specified values.type - OID specifiying the type of the attribute.values - a vector containing 1 or more ASN1Object values for the attribute.
public Attribute(java.io.InputStream is)
throws java.io.IOException
Attribute from the given input stream.is - input stream containing the encoding of the attribute.java.io.IOExceptionpublic oracle.security.crypto.asn1.ASN1ObjectID getType()
public void addValue(oracle.security.crypto.asn1.ASN1Object value)
public void setValues(java.util.Vector<? extends oracle.security.crypto.asn1.ASN1Object> values)
setValues(List)public void setValues(java.util.List<? extends oracle.security.crypto.asn1.ASN1Object> values)
@Deprecated public java.util.Enumeration<oracle.security.crypto.asn1.ASN1Object> values()
Attribute.Enumeration of the ASN1Object values.@Deprecated public java.util.Vector<oracle.security.crypto.asn1.ASN1Object> getValues()
public java.util.ArrayList<oracle.security.crypto.asn1.ASN1Object> getValuesAsList()
public int size()
Attribute.public java.lang.String toString()
toString in class java.lang.Object
public void input(java.io.InputStream is)
throws java.io.IOException
input in interface oracle.security.crypto.util.Streamablejava.io.IOException
public void output(java.io.OutputStream os)
throws java.io.IOException
output in interface oracle.security.crypto.util.Streamablejava.io.IOExceptionpublic int length()
length in interface oracle.security.crypto.util.Streamable
public void writeExternal(java.io.ObjectOutput os)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOException
public void readExternal(java.io.ObjectInput is)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOExceptionjava.lang.ClassNotFoundException