Skip navigation links

Oracle Security Developer Tools Security Engine Java API Reference
11g (11.1.1)

E10674-02


oracle.security.crypto.cert
Class X500RDN

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

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

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

Represents an X.500 Relative Distinguished Name. This is the building block for X.500 names.

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.

See Also:
for defined OIDs from the id_at arc., Serialized Form

Constructor Summary
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.

 

Method Summary
 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)
           
 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 types()
           
 void writeExternal(java.io.ObjectOutput os)
           

 

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

 

Constructor Detail

X500RDN

public X500RDN()
Creates a new Relative Distinguished Name with no entries.

X500RDN

public X500RDN(oracle.security.crypto.asn1.ASN1ObjectID type,
               oracle.security.crypto.asn1.ASN1Object value)
Creates a new Relative Distinguished Name with exactly one entry.

X500RDN

public X500RDN(oracle.security.crypto.asn1.ASN1ObjectID type,
               java.lang.String value)
Creates a new Relative Distinguished Name with exactly one entry.

X500RDN

public X500RDN(java.io.InputStream is)
        throws java.io.IOException
Creates a new Relative Distinguished Name by reading its BER encoding from the given input stream.
Throws:
java.io.IOException

Method Detail

addAttribute

public 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.
Parameters:
type - The OID identifying the attribute's type.
value - An ASN1Object value for the attribute.

addAttribute

public void addAttribute(oracle.security.crypto.asn1.ASN1ObjectID type,
                         java.lang.String value)
Adds and attribute to this RDN with the given type and 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.

Parameters:
type - The OID identifying the attribute's type.
value - A string value for the attribute.
See Also:
ASN1String, ASN1.PRINTABLE_STRING, ASN1.IA5STRING, ASN1.UTF8_STRING

types

public java.util.Enumeration types()

getValue

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

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Returns the string representation of this RDN. The format is the same as returned by toASCII(), except that non-ASCII Unicode characters (that is, ? and higher) are not escaped.
Overrides:
toString in class java.lang.Object

toASCII

public java.lang.String toASCII()
Returns this RDN representated as a sequence of printable ASCII characters. All characters are guaranteed to be in the range 32,...,127. The output is in strict conformance with RFC 2253. All control characters and special characters are escaped, as well as non-ASCII Unicode characters are first converted to UTF-8, then escaped.

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 Security Developer Tools Security Engine Java API Reference
11g (11.1.1)

E10674-02


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