public class MakeLDIFInputStream extends InputStream implements EntryWriter
Constructor and Description |
---|
MakeLDIFInputStream(TemplateFile templateFile)
Creates a new MakeLDIF input stream that will generate entries based on the
provided template file.
|
Modifier and Type | Method and Description |
---|---|
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(TemplateEntry entry)
Writes the provided entry to the appropriate target.
|
available, mark, markSupported, read, reset, skip
public MakeLDIFInputStream(TemplateFile templateFile)
templateFile
- The template file to use to generate the entries.public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
public int read() throws IOException
read
in class InputStream
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 IOException
read
in class InputStream
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.IOException
- If a problem has occurred while generating data for
use by this input stream.public boolean writeEntry(TemplateEntry entry) throws IOException, MakeLDIFException
EntryWriter
writeEntry
in interface EntryWriter
entry
- The entry to be written.true
if the entry writer will accept additional
entries, or false
if no more entries should be
written.IOException
- If a problem occurs while writing the entry to its
intended destination.MakeLDIFException
- If some other problem occurs.public void closeEntryWriter()
EntryWriter
closeEntryWriter
in interface EntryWriter
Copyright © 2010-2017 ForgeRock AS. All Rights Reserved.