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
-
AVA(DerInputStream)
- Constructs an AVA from a Der Input Stream.
-
AVA(InputStream)
- Constructs an AVA from an input stream of UTF8 bytes that form
a Ldap DN string.
-
AVA(ObjectIdentifier, DerValue)
-
Constructs an AVA from an OID and DerValue.
-
AVA(String)
-
Constructs an AVA from a Ldap DN string with one AVA component
using the global default LdapDNStrConverter.
-
AVA(String, LdapDNStrConverter)
-
Constructs an AVA from a Ldap DN string containing one AVA
component using the specified LdapDNStrConverter.
-
derEncode(OutputStream)
- DER encode this object onto an output stream.
-
encode(DerOutputStream)
- Encodes the AVA to a Der output stream.
-
equals(AVA)
-
Returns true if another AVA has the same OID and DerValue.
-
equals(Object)
-
Compares the AVA with an Object, returns true if the object is
an AVA and has the same OID and value.
-
getOid()
-
Returns the OID in the AVA.
-
getValue()
-
Returns the value in this AVA as a DerValue
-
toLdapDNString()
- Returns a Ldap DN string with one AVA component using
the global default LdapDNStrConverter.
-
toLdapDNString(LdapDNStrConverter)
- Returns a Ldap DN string with one AVA component using the specified
LdapDNStrConverter.
-
toString()
- Returns a Ldap DN string with the AVA component using the global
default LdapDNStrConverter, or null if an error occurs in conversion.
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
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
AVA
public AVA(ObjectIdentifier type,
DerValue val) throws IOException
- Constructs an AVA from an OID and DerValue.
- Parameters:
- type - an ObjectIdentifier
- val - a DerValue
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
AVA
public AVA(DerInputStream in) throws IOException
- Constructs an AVA from a Der Input Stream.
- Parameters:
- in - the Der Input Stream.
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.
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.
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.
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.
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
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
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.
getOid
public ObjectIdentifier getOid()
- Returns the OID in the AVA.
- Returns:
- the ObjectIdentifier in this AVA.
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