org.ldaptive.asn1
Class DN

java.lang.Object
  extended by org.ldaptive.asn1.DN
All Implemented Interfaces:
DEREncoder

public class DN
extends Object
implements DEREncoder

A sequence of RDN values.

Version:
$Revision: 3189 $ $Date: 2016-11-01 17:21:43 -0400 (Tue, 01 Nov 2016) $
Author:
Middleware Services

Constructor Summary
DN(Collection<RDN> names)
          Creates a new DN.
DN(RDN... names)
          Creates a new DN.
 
Method Summary
static DN decode(ByteBuffer encoded)
          Converts bytes in the buffer to a DN by reading from the current position to the limit.
 byte[] encode()
          Encode this object into it's DER type.
 boolean equals(Object o)
          
 RDN[] getRDNs()
          Returns the RDNs in this DN.
 int hashCode()
          
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DN

public DN(Collection<RDN> names)
Creates a new DN.

Parameters:
names - RDNs in this sequence

DN

public DN(RDN... names)
Creates a new DN.

Parameters:
names - RDNs in this sequence
Method Detail

getRDNs

public RDN[] getRDNs()
Returns the RDNs in this DN.

Returns:
RDNs

encode

public byte[] encode()
Encode this object into it's DER type.

Specified by:
encode in interface DEREncoder
Returns:
DER encoded object

decode

public static DN decode(ByteBuffer encoded)
Converts bytes in the buffer to a DN by reading from the current position to the limit.

Parameters:
encoded - buffer containing DER-encoded data where the buffer is positioned at the tag of the DN and the limit is set beyond the last byte of DN data.
Returns:
decoded bytes as a DN

equals

public boolean equals(Object o)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2003-2017 Virginia Tech. All Rights Reserved.