LDAP Classes
Implements Java LDAP

com.novell.ldap.util
Class LDIFReader

java.lang.Object
  extended bycom.novell.ldap.util.LDIFReader
All Implemented Interfaces:
LDAPReader

public class LDIFReader
extends java.lang.Object
implements LDAPReader

The class to process the inputStream object to read an LDIF file.

This calss reads LDAP entries and LDAP Requests form an LDIF file

The constructors uses a default size value of 8,192 to create the buffering character-input stream and assume that the size is big enough to hold the dn field and the first line of the next field of the first record in the LDIF file currently being read.

The constructors uses '1' as default LDIF file version


Constructor Summary
LDIFReader(java.io.InputStream in)
          Constructs an LDIFReader object by initializing LDIF_VERSION, isRequest, InputStreamReader, and BufferedReader.
LDIFReader(java.io.InputStream in, int version)
          Constructs an LDIFReader object by initializing LDIF_VERSION, isRequest, InputStreamReader, and BufferedReader.
LDIFReader(java.io.InputStream in, int version, int bufSize)
          Constructs an LDIFReader object by initializing LDIF_VERSION, isRequest, InputStreamReader, and BufferedReader.
 
Method Summary
 java.lang.String getVersion()
          Gets the version of the LDIF data associated with the input stream
 boolean isRequest()
          Returns true if request data ist associated with the input stream, or false if content data.
 LDAPMessage readMessage()
          Read LDAP Requests from the LDIF request (change) file or content file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LDIFReader

public LDIFReader(java.io.InputStream in)
           throws java.io.IOException,
                  LDAPLocalException
Constructs an LDIFReader object by initializing LDIF_VERSION, isRequest, InputStreamReader, and BufferedReader.

Parameters:
in - The InputStream object to be processed by LDIFReader

LDIFReader

public LDIFReader(java.io.InputStream in,
                  int version)
           throws java.io.IOException,
                  LDAPLocalException
Constructs an LDIFReader object by initializing LDIF_VERSION, isRequest, InputStreamReader, and BufferedReader.

Parameters:
in - The Inputstream object to be processed by LDIFReader
version - The version currently used in the LDIF file

LDIFReader

public LDIFReader(java.io.InputStream in,
                  int version,
                  int bufSize)
           throws java.io.IOException,
                  LDAPLocalException
Constructs an LDIFReader object by initializing LDIF_VERSION, isRequest, InputStreamReader, and BufferedReader.

Parameters:
in - The Inputstream object to be processed by LDIFReader
version - The version currently used in the LDIF file
bufSize - The size used to create a buffering character-input stream. The defaule value is 8,192.
Method Detail

getVersion

public java.lang.String getVersion()
Gets the version of the LDIF data associated with the input stream

Specified by:
getVersion in interface LDAPReader
Returns:
the version number

isRequest

public boolean isRequest()
Returns true if request data ist associated with the input stream, or false if content data.

Specified by:
isRequest in interface LDAPReader
Returns:
true if input stream contains request data.

readMessage

public LDAPMessage readMessage()
                        throws java.io.IOException,
                               LDAPException
Read LDAP Requests from the LDIF request (change) file or content file.

Specified by:
readMessage in interface LDAPReader
Returns:
LDAPMessage specified by the record
Throws:
java.io.IOException
LDAPException

LDAP Classes
Implements Java LDAP

Copyright © 2002 Novell, Inc. All Rights Reserved.
Novell, Inc.
1800 South Novell Place
Provo, Ut 84606
Phone: (801) 861-5000