All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class netscape.security.x509.RDN

netscape.security.x509.RDN

public class RDN
RDNs are a set of {attribute = value} assertions. Some of those attributes are "distinguished" (unique w/in context). Order is never relevant. Some X.500 names include only a single distinguished attribute per RDN. This style is currently common. Note that DER-encoded RDNs sort AVAs by assertion OID ... so that when we parse this data we don't have to worry about canonicalizing it, but we'll need to sort them when we expose the RDN class more.

See Also:
X500Name, AVA, LdapDNStrConverter

Constructor Index

 o RDN(AVA[])
Constructs a RDN from an array of AVA.
 o RDN(DerInputStream)
Constructs a RDN from a Der Input Stream.
 o RDN(DerValue)
Constructs a RDN from a DerValue.
 o RDN(String)
Constructs a RDN from a Ldap DN String with one RDN component using the global default LdapDNStrConverter.
 o RDN(String, LdapDNStrConverter)
Constructs a RDN from a Ldap DN string with one RDN component using the specified Ldap DN Str converter.
 o RDN(Vector)
convenience method.

Method Index

 o encode(DerOutputStream)
Encodes this RDN to a Der output stream.
 o equals(RDN)
Checks if this RDN is the same as another by comparing the AVAs in the RDNs.
 o getAssertion()
returns an array of AVA in the RDN.
 o getAssertionLength()
returns the number of AVAs in the RDN.
 o getAVAs()
returns an enumeration of AVAs that make up this RDN.
 o toLdapDNString()
Returns a Ldap DN string with one RDN component using the global default LdapDNStrConverter.
 o toLdapDNString(LdapDNStrConverter)
Returns a Ldap DN String with this RDN component using the specified LdapDNStrConverter.
 o toString()
Returns a Ldap DN string with this RDN component using the global default LdapDNStrConverter.

Constructors

 o RDN
 public RDN(String rdnString) throws IOException
Constructs a RDN from a Ldap DN String with one RDN component using the global default LdapDNStrConverter.

Parameters:
rdnString - a Ldap DN string with one RDN component, e.g. as defined in RFC1779.
Throws: IOException
if error occurs while parsing the string.
See Also:
LdapDNStrConverter
 o RDN
 public RDN(String rdnString,
            LdapDNStrConverter ldapDNStrConverter) throws IOException
Constructs a RDN from a Ldap DN string with one RDN component using the specified Ldap DN Str converter. For example, RFC1779StrConverter can be passed to parse a Ldap DN string in RFC1779 format.

Parameters:
rdnString - Ldap DN string.
ldapDNStrConverter - a LdapDNStrConverter.
See Also:
LdapDNStrConverter
 o RDN
 public RDN(DerValue set) throws IOException
Constructs a RDN from a DerValue.

Parameters:
set - Der value of a set of AVAs.
 o RDN
 public RDN(DerInputStream in) throws IOException
Constructs a RDN from a Der Input Stream.

Parameters:
in - a Der Input Stream.
 o RDN
 public RDN(AVA avas[])
Constructs a RDN from an array of AVA.

Parameters:
avas - a AVA Array.
 o RDN
 public RDN(Vector avaVector)
convenience method.

Methods

 o getAssertion
 public AVA[] getAssertion()
returns an array of AVA in the RDN.

Returns:
array of AVA in this RDN.
 o getAssertionLength
 public int getAssertionLength()
returns the number of AVAs in the RDN.

Returns:
number of AVAs in this RDN.
 o equals
 public boolean equals(RDN other)
Checks if this RDN is the same as another by comparing the AVAs in the RDNs.

Parameters:
other - the other RDN.
Returns:
true iff the other RDN is the same.
 o encode
 public void encode(DerOutputStream out) throws IOException
Encodes this RDN to a Der output stream.

Parameters:
out - the Der Output Stream.
 o getAVAs
 public Enumeration getAVAs()
returns an enumeration of AVAs that make up this RDN.

Returns:
an enumeration of AVAs that make up this RDN.
 o toLdapDNString
 public String toLdapDNString() throws IOException
Returns a Ldap DN string with one RDN component using the global default LdapDNStrConverter.

Returns:
the Ldap DN String of this RDN.
Throws: IOException
if an error occurs during the conversion.
See Also:
LdapDNStrConverter
 o toLdapDNString
 public String toLdapDNString(LdapDNStrConverter ldapDNStrConverter) throws IOException
Returns a Ldap DN String with this RDN component using the specified LdapDNStrConverter.

Parameters:
ldapDNStrConverter - a LdapDNStrConverter.
Returns:
a Ldap DN String.
Throws: IOException
if an error occurs in the conversion.
See Also:
LdapDNStrConverter
 o toString
 public String toString()
Returns a Ldap DN string with this RDN component using the global default LdapDNStrConverter.

Returns:
the Ldap DN String with this RDN component, null if an error occurs in the conversion.
See Also:
LdapDNStrConverter

All Packages  Class Hierarchy  This Package  Previous  Next  Index