|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.InputStream
org.opends.server.tools.makeldif.MakeLDIFInputStream
public class MakeLDIFInputStream
This class creates an input stream that can be used to read entries generated by MakeLDIF as if they were being read from another source like a file. It has a fixed-size queue that dictates how many entries may be held in memory at any given time.
| Constructor Summary | |
|---|---|
MakeLDIFInputStream(TemplateFile templateFile)
Creates a new MakeLDIF input stream that will generate entries based on the provided template file. |
|
| Method Summary | |
|---|---|
void |
close()
Closes this input stream so that no more data may be read from it. |
void |
closeEntryWriter()
Notifies the entry writer that no more entries will be provided and that any associated cleanup may be performed. |
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. |
boolean |
writeEntry(Entry entry)
Writes the provided entry to the appropriate target. |
| 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 |
|---|
public MakeLDIFInputStream(TemplateFile templateFile)
templateFile - The template file to use to generate the entries.| Method Detail |
|---|
public void close()
close in interface java.io.Closeableclose in class java.io.InputStream
public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOException - If a problem has occurred while generating data for
use by this input stream.
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamb - 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.
java.io.IOException - If a problem has occurred while generating data for
use by this input stream.
public boolean writeEntry(Entry entry)
throws java.io.IOException,
MakeLDIFException
writeEntry in interface EntryWriterentry - The entry to be written.
true if the entry writer will accept additional
entries, or false if no more entries should be
written.
java.io.IOException - If a problem occurs while writing the entry to its
intended destination.
MakeLDIFException - If some other problem occurs.public void closeEntryWriter()
closeEntryWriter in interface EntryWriter
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||