org.opends.server.replication.plugin
Class ReplLDIFInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.opends.server.replication.plugin.ReplLDIFInputStream
All Implemented Interfaces:
java.io.Closeable

public class ReplLDIFInputStream
extends java.io.InputStream

This class creates an input stream that can be used to read entries generated by SynchroLDIF as if they were being read from another source like a file.


Constructor Summary
ReplLDIFInputStream(ReplicationDomain domain)
          Creates a new ReplLDIFInputStream that will import entries for a synchronzation domain.
 
Method Summary
 void close()
          Closes this input stream so that no more data may be read from it.
 int read()
          Reads a single byte of data from this input stream.
 int read(byte[] b, int off, int len)
          Reads data from this input stream.
 
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplLDIFInputStream

public ReplLDIFInputStream(ReplicationDomain domain)
Creates a new ReplLDIFInputStream that will import entries for a synchronzation domain.

Parameters:
domain - The replication domain
Method Detail

close

public void close()
Closes this input stream so that no more data may be read from it.

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.InputStream

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Reads data from this input stream.

Overrides:
read in class java.io.InputStream
Parameters:
b - The array into which the data should be read.
off - The position in the array at which point the data read may be placed.
len - The maximum number of bytes that may be read into the provided array.
Returns:
The number of bytes read from the input stream into the provided array, or -1 if the end of the stream has been reached.
Throws:
java.io.IOException - If a problem has occurred while generating data for use by this input stream.

read

public int read()
         throws java.io.IOException
Reads a single byte of data from this input stream.

Specified by:
read in class java.io.InputStream
Returns:
The byte read from the input stream, or -1 if the end of the stream has been reached.
Throws:
java.io.IOException - If a problem has occurred while generating data for use by this input stream.