org.apache.directory.shared.ldap.name
Class LdapDNSerializer

java.lang.Object
  extended by org.apache.directory.shared.ldap.name.LdapDNSerializer

public class LdapDNSerializer
extends java.lang.Object

A helper class which serialize and deserialize a DN

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Field Summary
protected static org.slf4j.Logger LOG
          The LoggerFactory used by this class
 
Constructor Summary
LdapDNSerializer()
           
 
Method Summary
static LdapDN deserialize(java.io.ObjectInput in)
          Deserialize a DN We read back the data to create a new LdapDN.
static void serialize(LdapDN dn, java.io.ObjectOutput out)
          Serialize a DN We have to store a DN data efficiently.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.slf4j.Logger LOG
The LoggerFactory used by this class

Constructor Detail

LdapDNSerializer

public LdapDNSerializer()
Method Detail

serialize

public static void serialize(LdapDN dn,
                             java.io.ObjectOutput out)
                      throws java.io.IOException
Serialize a DN We have to store a DN data efficiently. Here is the structure :
  • upName
  • The User provided DN

  • normName
  • May be null if the normName is equivalent to the upName

  • rdns
  • The rdn's List.

    for each rdn :

  • call the RDN write method
  • Parameters:
    dn - The DN to serialize
    out - the stream in which the DN will be serialized
    Throws:
    java.io.IOException - If we can't write in this stream

    deserialize

    public static LdapDN deserialize(java.io.ObjectInput in)
                              throws java.io.IOException
    Deserialize a DN We read back the data to create a new LdapDN. The structure read is exposed in the serialize(LdapDN, ObjectOutput) method

    Parameters:
    in - The input stream from which the DN is read
    Returns:
    a deserialized DN
    Throws:
    java.io.IOException - If the stream can't be read


    Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.