public final class AVA extends java.lang.Object implements DerEncoder
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.
X500Name
,
RDN
,
LdapDNStrConverter
Constructor and Description |
---|
AVA(DerInputStream in)
Constructs an AVA from a Der Input Stream.
|
AVA(java.io.InputStream in)
Constructs an AVA from an input stream of UTF8 bytes that form
a Ldap DN string.
|
AVA(ObjectIdentifier type,
DerValue val)
Constructs an AVA from an OID and DerValue.
|
AVA(java.lang.String avaString)
Constructs an AVA from a Ldap DN string with one AVA component
using the global default LdapDNStrConverter.
|
AVA(java.lang.String avaString,
byte[] tags)
Like AVA(String) with a DER encoding order given for Directory Strings.
|
AVA(java.lang.String avaString,
LdapDNStrConverter ldapDNStrConverter)
Constructs an AVA from a Ldap DN string containing one AVA
component using the specified LdapDNStrConverter.
|
Modifier and Type | Method and Description |
---|---|
void |
derEncode(java.io.OutputStream out)
DER encode this object onto an output stream.
|
void |
encode(DerOutputStream out)
Encodes the AVA to a Der output stream.
|
boolean |
equals(AVA other)
Returns true if another AVA has the same OID and DerValue.
|
boolean |
equals(java.lang.Object other)
Compares the AVA with an Object, returns true if the object is
an AVA and has the same OID and value.
|
ObjectIdentifier |
getOid()
Returns the OID in the AVA.
|
DerValue |
getValue()
Returns the value in this AVA as a DerValue
|
int |
hashCode() |
java.lang.String |
toLdapDNString()
Returns a Ldap DN string with one AVA component using
the global default LdapDNStrConverter.
|
java.lang.String |
toLdapDNString(LdapDNStrConverter ldapDNStrConverter)
Returns a Ldap DN string with one AVA component using the specified
LdapDNStrConverter.
|
java.lang.String |
toString()
Returns a Ldap DN string with the AVA component using the global
default LdapDNStrConverter, or null if an error occurs in conversion.
|
public AVA(java.lang.String avaString) throws java.io.IOException
avaString
- a Ldap DN string with one AVA component.java.io.IOException
LdapDNStrConverter
public AVA(java.lang.String avaString, byte[] tags) throws java.io.IOException
java.io.IOException
public AVA(java.lang.String avaString, LdapDNStrConverter ldapDNStrConverter) throws java.io.IOException
avaString
- a Ldap DN string containing one AVA.ldapDNStrConverter
- a LdapDNStrConverterjava.io.IOException
LdapDNStrConverter
public AVA(ObjectIdentifier type, DerValue val) throws java.io.IOException
type
- an ObjectIdentifierval
- a DerValuejava.io.IOException
public AVA(java.io.InputStream in) throws java.io.IOException
in
- the input stream.java.io.IOException
LdapDNStrConverter
public AVA(DerInputStream in) throws java.io.IOException
in
- the Der Input Stream.java.io.IOException
public boolean equals(AVA other)
other
- the other AVA.public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- the other object.public int hashCode()
hashCode
in class java.lang.Object
public void encode(DerOutputStream out) throws java.io.IOException
out
- The Der output stream.java.io.IOException
public void derEncode(java.io.OutputStream out) throws java.io.IOException
DerEncoder
interface.derEncode
in interface DerEncoder
out
- the output stream on which to write the DER encoding.java.io.IOException
- on encoding error.public java.lang.String toLdapDNString() throws java.io.IOException
java.io.IOException
- if an error occurs during conversion.LdapDNStrConverter
public java.lang.String toLdapDNString(LdapDNStrConverter ldapDNStrConverter) throws java.io.IOException
ldapDNStrConverter
- a Ldap DN String Converterjava.io.IOException
- if an error occurs during the conversion.LdapDNStrConverter
public java.lang.String toString()
toString
in class java.lang.Object
public ObjectIdentifier getOid()
public DerValue getValue()