public class X500RDN
extends java.lang.Object
implements oracle.security.crypto.asn1.ASN1Object, java.io.Externalizable
A Relative Distinguished Name consists of a set of attribute-value pairs. Typically, there is a single attribute-value pair in each Relative Distinguished Name.
| Constructor and Description |
|---|
X500RDN()
Creates a new Relative Distinguished Name with no entries.
|
X500RDN(oracle.security.crypto.asn1.ASN1ObjectID type, oracle.security.crypto.asn1.ASN1Object value)
Creates a new Relative Distinguished Name with exactly one entry.
|
X500RDN(oracle.security.crypto.asn1.ASN1ObjectID type, java.lang.String value)
Creates a new Relative Distinguished Name with exactly one entry.
|
X500RDN(java.io.InputStream is)
Creates a new Relative Distinguished Name by reading its BER encoding from the given input stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(oracle.security.crypto.asn1.ASN1ObjectID type, oracle.security.crypto.asn1.ASN1Object value)
Adds and attribute to this RDN with the given type and value.
|
void |
addAttribute(oracle.security.crypto.asn1.ASN1ObjectID type, java.lang.String value)
Adds and attribute to this RDN with the given type and value.
|
boolean |
equals(java.lang.Object o) |
oracle.security.crypto.asn1.ASN1Object |
getValue(oracle.security.crypto.asn1.ASN1ObjectID type) |
java.util.Map<oracle.security.crypto.asn1.ASN1ObjectID,AttributeTypeAndValue> |
getValues() |
int |
hashCode() |
void |
input(java.io.InputStream is) |
int |
length() |
void |
output(java.io.OutputStream os) |
void |
readExternal(java.io.ObjectInput is) |
java.lang.String |
toASCII()
Returns this RDN representated as a sequence of printable ASCII characters.
|
java.lang.String |
toString()
Returns the string representation of this RDN.
|
java.util.Enumeration<oracle.security.crypto.asn1.ASN1ObjectID> |
types()
Deprecated.
Use
getValues() |
void |
writeExternal(java.io.ObjectOutput os) |
public X500RDN()
public X500RDN(oracle.security.crypto.asn1.ASN1ObjectID type,
oracle.security.crypto.asn1.ASN1Object value)
public X500RDN(oracle.security.crypto.asn1.ASN1ObjectID type,
java.lang.String value)
public X500RDN(java.io.InputStream is)
throws java.io.IOException
java.io.IOException
public void addAttribute(oracle.security.crypto.asn1.ASN1ObjectID type,
oracle.security.crypto.asn1.ASN1Object value)
type - The OID identifying the attribute's type.value - An ASN1Object value for the attribute.
public void addAttribute(oracle.security.crypto.asn1.ASN1ObjectID type,
java.lang.String value)
An ASN1String will be constructed for the given string value, having a string type appropriate to the value's character composition. For example, a countryName attribute "C=US" will have its value encoded as an ASN.1 PrintableString, while an emailAddress attribute "Email=support@example.org" will have its value encoded as an ASN.1 IA5String. An attribute with characters beyond the numeric value of 127 will be encoded as an ASN.1 UTF8String.
type - The OID identifying the attribute's type.value - A string value for the attribute.ASN1String, ASN1.PRINTABLE_STRING, ASN1.IA5STRING, ASN1.UTF8_STRINGpublic java.util.Enumeration<oracle.security.crypto.asn1.ASN1ObjectID> types()
getValues()public java.util.Map<oracle.security.crypto.asn1.ASN1ObjectID,AttributeTypeAndValue> getValues()
public oracle.security.crypto.asn1.ASN1Object getValue(oracle.security.crypto.asn1.ASN1ObjectID type)
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic java.lang.String toString()
toASCII(), except that non-ASCII Unicode characters (that is, € and higher) are not escaped.toString in class java.lang.Objectpublic java.lang.String toASCII()
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