org.jmonks.batch.io.flat
Class DelimitedFlatFileWriter
java.lang.Object
org.jmonks.batch.io.FileWriter
org.jmonks.batch.io.flat.FlatFileWriter
org.jmonks.batch.io.flat.DelimitedFlatFileWriter
- public class DelimitedFlatFileWriter
- extends FlatFileWriter
DelimitedFlatFileWriter writes the file according to the given file spec
with the data submitted in the form of WriterRecord's. This provides the methods
to create the required writer records and write the writer record into the file writer.
Once finished writing of all the records file writer should be closed by calling
the "close" method.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Suresh Pragada
Constructor Summary |
DelimitedFlatFileWriter(java.io.OutputStream outputStream,
FileSpec fileSpec)
Constructs the Delimited flat file writer from the given output stream
and file spec. |
DelimitedFlatFileWriter(java.io.Writer writer,
FileSpec fileSpec)
Constructs the Delimited flat file writer from the given output stream
and file spec. |
Method Summary |
protected java.lang.String |
generateRecord(WriterRecord writerRecord)
Generates the string represenatation of the record from the writer record given by client. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DelimitedFlatFileWriter
public DelimitedFlatFileWriter(java.io.OutputStream outputStream,
FileSpec fileSpec)
- Constructs the Delimited flat file writer from the given output stream
and file spec.
- Parameters:
outputStream
- Output stream representing the file to generate.fileSpec
- File spec of the delimited flat to be generated.
DelimitedFlatFileWriter
public DelimitedFlatFileWriter(java.io.Writer writer,
FileSpec fileSpec)
- Constructs the Delimited flat file writer from the given output stream
and file spec.
- Parameters:
writer
- Writer representing the file to generate.fileSpec
- File spec of the delimited flat to be generated.
generateRecord
protected java.lang.String generateRecord(WriterRecord writerRecord)
throws java.io.IOException
- Generates the string represenatation of the record from the writer record given by client.
- Specified by:
generateRecord
in class FlatFileWriter
- Parameters:
writerRecord
- Writer record consists of field names and values.
- Returns:
- Returns the string representation of the record.
- Throws:
java.io.IOException