public abstract class FileColumnWriter extends Object
Constructor and Description |
---|
FileColumnWriter(int width,
int precission)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addColumns(ColumnInfo column,
List<Object> columnValues,
int i)
Add the columns values in a map be able to print each line.
|
void |
close()
Close the output file.
|
void |
createFile(File file)
Create the file to print the column values.
|
void |
writeColumns()
Write the columns in the text file in file format.
|
void |
writeColumns(String spaceCol)
Write the columns in the text file in file format.
|
abstract void |
writeHeader(List<ColumnInfo> columnInfoList)
Abstract method for writing specified header for a based column text file.
|
void |
writeLine()
Write a new empty line in the file.
|
void |
writeLine(String value)
Write a new line in the file.
|
public FileColumnWriter(int width, int precission)
width
- width in characters.precission
- of the column values.public abstract void writeHeader(List<ColumnInfo> columnInfoList)
columnInfoList
- list containing the list of column definitions.public void createFile(File file) throws IOException
file
- destination fileIOException
- in case of error creating the filepublic void close()
public void addColumns(ColumnInfo column, List<Object> columnValues, int i)
column
- current column definitioncolumnValues
- the values of the columni
- the index of the columnpublic void writeColumns()
public void writeColumns(String spaceCol)
spaceCol
- space between two columspublic void writeLine(String value)
value
- to print in the filepublic void writeLine()
Copyright © 2024. All rights reserved.