public class SimpleMultiFileDataWritter extends Object implements MultiDataWriter
MultiFileDataWritter.| Modifier and Type | Method and Description |
|---|---|
static MultiDataWriter |
getInstance()
Singleton instance.
|
boolean |
hasWriter(String filename)
Checks if a writer exists.
|
void |
newWriter(String filename)
Defines a new writer.
|
void |
write(String filename,
String data,
boolean noDups)
Writes out data.
|
public static MultiDataWriter getInstance()
public void newWriter(String filename) throws NoSuchFileException
MultiDataWriternewWriter in interface MultiDataWriterfilename - the name of the file to write toNoSuchFileException - if the file path is wrongpublic boolean hasWriter(String filename)
MultiDataWriterhasWriter in interface MultiDataWriterfilename - the name of the file to write topublic void write(String filename, String data, boolean noDups) throws NoSuchFileException, IOException
MultiDataWriterwrite in interface MultiDataWriterfilename - The destination to writes on.data - The data that should be written.noDups - If true duplicate records are not allowed.NoSuchFileException - if the file path is wrongIOException - is something went wrongCopyright © 2015 Omnia Consulting. All rights reserved.