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

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

public class DnSerializer
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
DnSerializer()
           
 
Method Summary
static DN deserialize(java.io.ObjectInput in)
          Deserialize a DN We read back the data to create a new DN.
static void serialize(DN 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

DnSerializer

public DnSerializer()
Method Detail

serialize

public static void serialize(DN 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 DN deserialize(java.io.ObjectInput in)
                          throws java.io.IOException
    Deserialize a DN We read back the data to create a new DN. The structure read is exposed in the serialize(DN, 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.