All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class netscape.security.x509.AVA

netscape.security.x509.AVA

public final class AVA
implements DerEncoder
X.500 Attribute-Value-Assertion (AVA): an attribute, as identified by some attribute ID, has some particular value. Values are as a rule ASN.1 printable strings. A conventional set of type IDs is recognized when parsing (and generating) RFC 1779 syntax strings.

AVAs are components of X.500 relative names. Think of them as being individual fields of a database record. The attribute ID is how you identify the field, and the value is part of a particular record.

See Also:
X500Name, RDN, LdapDNStrConverter

Constructor Index

 o AVA(DerInputStream)
Constructs an AVA from a Der Input Stream.
 o AVA(InputStream)
Constructs an AVA from an input stream of UTF8 bytes that form a Ldap DN string.
 o AVA(ObjectIdentifier, DerValue)
Constructs an AVA from an OID and DerValue.
 o AVA(String)
Constructs an AVA from a Ldap DN string with one AVA component using the global default LdapDNStrConverter.
 o AVA(String, LdapDNStrConverter)
Constructs an AVA from a Ldap DN string containing one AVA component using the specified LdapDNStrConverter.

Method Index

 o derEncode(OutputStream)
DER encode this object onto an output stream.
 o encode(DerOutputStream)
Encodes the AVA to a Der output stream.
 o equals(AVA)
Returns true if another AVA has the same OID and DerValue.
 o equals(Object)
Compares the AVA with an Object, returns true if the object is an AVA and has the same OID and value.
 o getOid()
Returns the OID in the AVA.
 o getValue()
Returns the value in this AVA as a DerValue
 o toLdapDNString()
Returns a Ldap DN string with one AVA component using the global default LdapDNStrConverter.
 o toLdapDNString(LdapDNStrConverter)
Returns a Ldap DN string with one AVA component using the specified LdapDNStrConverter.
 o toString()
Returns a Ldap DN string with the AVA component using the global default LdapDNStrConverter, or null if an error occurs in conversion.

Constructors

 o AVA
 public AVA(String avaString) throws IOException
Constructs an AVA from a Ldap DN string with one AVA component using the global default LdapDNStrConverter.

Parameters:
avaString - a Ldap DN string with one AVA component.
See Also:
LdapDNStrConverter
 o AVA
 public AVA(String avaString,
            LdapDNStrConverter ldapDNStrConverter) throws IOException
Constructs an AVA from a Ldap DN string containing one AVA component using the specified LdapDNStrConverter.

Parameters:
avaString - a Ldap DN string containing one AVA.
ldapDNStrConverter - a LdapDNStrConverter
See Also:
LdapDNStrConverter
 o AVA
 public AVA(ObjectIdentifier type,
            DerValue val) throws IOException
Constructs an AVA from an OID and DerValue.

Parameters:
type - an ObjectIdentifier
val - a DerValue
 o AVA
 public AVA(InputStream in) throws IOException
Constructs an AVA from an input stream of UTF8 bytes that form a Ldap DN string. Then parse the Ldap DN string using the global default LdapDNStrConverter.
Parses an RFC 1779 style AVA string: CN=fee fie foe fum or perhaps with quotes. Not all defined AVA tags are supported; of current note are X.400 related ones (PRMD, ADMD, etc). This terminates at unescaped AVA separators ("+") or RDN separators (",", ";"), or DN terminators (">"), and removes cosmetic whitespace at the end of values.

Parameters:
in - the input stream.
See Also:
LdapDNStrConverter
 o AVA
 public AVA(DerInputStream in) throws IOException
Constructs an AVA from a Der Input Stream.

Parameters:
in - the Der Input Stream.

Methods

 o equals
 public boolean equals(AVA other)
Returns true if another AVA has the same OID and DerValue.

Parameters:
other - the other AVA.
Returns:
ture iff other AVA has same oid and value.
 o equals
 public boolean equals(Object other)
Compares the AVA with an Object, returns true if the object is an AVA and has the same OID and value.

Parameters:
other - the other object.
Returns:
true iff other object is an AVA and has same oid and value.
 o encode
 public void encode(DerOutputStream out) throws IOException
Encodes the AVA to a Der output stream. AVAs are encoded as a SEQUENCE of two elements.

Parameters:
out - The Der output stream.
 o derEncode
 public void derEncode(OutputStream out) throws IOException
DER encode this object onto an output stream. Implements the DerEncoder interface.

Parameters:
out - the output stream on which to write the DER encoding.
Throws: IOException
on encoding error.
 o toLdapDNString
 public String toLdapDNString() throws IOException
Returns a Ldap DN string with one AVA component using the global default LdapDNStrConverter.

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

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

Returns:
a Ldap DN string containing the AVA, or null if an error occurs in the conversion.
 o getOid
 public ObjectIdentifier getOid()
Returns the OID in the AVA.

Returns:
the ObjectIdentifier in this AVA.
 o getValue
 public DerValue getValue()
Returns the value in this AVA as a DerValue

Returns:
attribute value in this AVA.

All Packages  Class Hierarchy  This Package  Previous  Next  Index