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
-
RDN(AVA[])
- Constructs a RDN from an array of AVA.
-
RDN(DerInputStream)
-
Constructs a RDN from a Der Input Stream.
-
RDN(DerValue)
-
Constructs a RDN from a DerValue.
-
RDN(String)
-
Constructs a RDN from a Ldap DN String with one RDN component
using the global default LdapDNStrConverter.
-
RDN(String, LdapDNStrConverter)
-
Constructs a RDN from a Ldap DN string with one RDN component
using the specified Ldap DN Str converter.
-
RDN(Vector)
- convenience method.
-
encode(DerOutputStream)
-
Encodes this RDN to a Der output stream.
-
equals(RDN)
-
Checks if this RDN is the same as another by comparing the AVAs
in the RDNs.
-
getAssertion()
-
returns an array of AVA in the RDN.
-
getAssertionLength()
-
returns the number of AVAs in the RDN.
-
getAVAs()
-
returns an enumeration of AVAs that make up this RDN.
-
toLdapDNString()
- Returns a Ldap DN string with one RDN component using the
global default LdapDNStrConverter.
-
toLdapDNString(LdapDNStrConverter)
- Returns a Ldap DN String with this RDN component using the specified
LdapDNStrConverter.
-
toString()
- Returns a Ldap DN string with this RDN component using the global
default LdapDNStrConverter.
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
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
RDN
public RDN(DerValue set) throws IOException
- Constructs a RDN from a DerValue.
- Parameters:
- set - Der value of a set of AVAs.
RDN
public RDN(DerInputStream in) throws IOException
- Constructs a RDN from a Der Input Stream.
- Parameters:
- in - a Der Input Stream.
RDN
public RDN(AVA avas[])
- Constructs a RDN from an array of AVA.
- Parameters:
- avas - a AVA Array.
RDN
public RDN(Vector avaVector)
- convenience method.
getAssertion
public AVA[] getAssertion()
- returns an array of AVA in the RDN.
- Returns:
- array of AVA in this RDN.
getAssertionLength
public int getAssertionLength()
- returns the number of AVAs in the RDN.
- Returns:
- number of AVAs in this RDN.
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.
encode
public void encode(DerOutputStream out) throws IOException
- Encodes this RDN to a Der output stream.
- Parameters:
- out - the Der Output Stream.
getAVAs
public Enumeration getAVAs()
- returns an enumeration of AVAs that make up this RDN.
- Returns:
- an enumeration of AVAs that make up this RDN.
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
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
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