org.pf.directory.ldif
Class LDIFReader

java.lang.Object
  extended by org.pf.directory.ldif.LDIFLineProcessor
      extended by org.pf.directory.ldif.LDIFReader
All Implemented Interfaces:
LineProcessor

public class LDIFReader
extends LDIFLineProcessor

A reader for LDIF input

Version:
1.1
Author:
M.Duchrow

Constructor Summary
LDIFReader()
          Initialize the new instance with default values.
 
Method Summary
static LDIFReader n()
          Returns a new instance of this class ;
 ObjectContainer read(java.io.InputStream stream)
          Reads all entries from the given LDIF stream.
 ObjectContainer read(java.lang.String filename)
          Reads all entries from the LDIF file specified by the given filename.
 
Methods inherited from class org.pf.directory.ldif.LDIFLineProcessor
processLine
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LDIFReader

public LDIFReader()
Initialize the new instance with default values.

Method Detail

n

public static LDIFReader n()
Returns a new instance of this class ;


read

public ObjectContainer read(java.lang.String filename)
                     throws java.io.IOException
Reads all entries from the LDIF file specified by the given filename. Returns a List of LDAPDirEntry objects.

Parameters:
filename - The name of the LDIF file to read
Throws:
java.io.IOException

read

public ObjectContainer read(java.io.InputStream stream)
                     throws java.io.IOException
Reads all entries from the given LDIF stream. Returns a List of LDAPDirEntry objects. The passed in stream will be closed after execution!

Parameters:
stream - The stream from which to read the LDIF data
Throws:
java.io.IOException