org.apache.directory.shared.ldap.ldif
Class LdifComposerImpl

java.lang.Object
  extended by org.apache.directory.shared.ldap.ldif.LdifComposerImpl
All Implemented Interfaces:
LdifComposer

public class LdifComposerImpl
extends Object
implements LdifComposer

An LDAP Data Interchange Format (LDIF) composer. TODO Get the RFC for LDIF syntax in this javadoc.

Version:
$Revision: 469947 $
Author:
Apache Directory Project

Constructor Summary
LdifComposerImpl()
           
 
Method Summary
 char[] base64encode(byte[] byteArray)
          Encodes an binary data into a base64 String.
 String compose(MultiMap attrHash)
          Generates an LDIF from a multi map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LdifComposerImpl

public LdifComposerImpl()
Method Detail

compose

public String compose(MultiMap attrHash)
Generates an LDIF from a multi map.

Specified by:
compose in interface LdifComposer
Parameters:
attrHash - the multi map of single and multivalued attributes.
Returns:
the LDIF as a String.

base64encode

public char[] base64encode(byte[] byteArray)
Encodes an binary data into a base64 String.

Parameters:
byteArray - the value of a binary attribute.
Returns:
the encoded binary data as a char array.


Copyright © 2004-2012. All Rights Reserved.