public abstract class AbstractVTSWriter extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AbstractVTSWriter.ColumnId
Column identifiers.
|
Constructor and Description |
---|
AbstractVTSWriter(File resultFilePath)
This method initialise the ResultWriter.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addColumn(AbstractVTSWriter.ColumnId columnId)
Add a column to the output file.
|
void |
addValue(AbstractVTSWriter.ColumnId columnId,
Object value)
This method adds a value to a column.
|
void |
close()
This method closes the output stream.
|
File |
getResultFilePath()
Get the output file.
|
protected boolean |
isHeaderWritten()
Get the header that has been written.
|
protected void |
open(VTSHeaderInfo headerInfo)
This method opens the result file.
|
void |
setDoubleFormatParams(int size,
int precission)
Set the double format size and preccission.
|
protected void |
writef(boolean writeEOL,
String format,
Object... args)
Write a line with format.
|
protected abstract void |
writeHeader(VTSHeaderInfo headerInfo)
Write Header.
|
protected void |
writeHeaderComment(VTSHeaderInfo headerInfo,
VTSHeaderInfo.VTSHeaderItemIterface headerItem)
Write a header comment.
|
protected void |
writeHeaderField(VTSHeaderInfo headerInfo,
VTSHeaderInfo.VTSHeaderItemIterface headerItem)
Write a header item.
|
void |
writeLine()
This method writes a line with the values for each column.
|
protected void |
writeLn()
This method writes as a printf in the output stream.
|
public AbstractVTSWriter(File resultFilePath)
resultFilePath
- Path of the file where values will be written.public void setDoubleFormatParams(int size, int precission)
size
- double format size.precission
- double format precission.public File getResultFilePath()
protected void addColumn(AbstractVTSWriter.ColumnId columnId) throws GVTSException
columnId
- The ID of the column.GVTSException
- When the header is already written.public void addValue(AbstractVTSWriter.ColumnId columnId, Object value)
columnId
- The ID of the column.value
- The Value to enter in the column.protected void open(VTSHeaderInfo headerInfo) throws GVTSException
headerInfo
- header information fields.GVTSException
- If the input stream cannot be open.protected abstract void writeHeader(VTSHeaderInfo headerInfo)
headerInfo
- header information fields.public void writeLine() throws GVTSException
GVTSException
- If the results cannot be written.public void close()
protected void writeLn()
protected void writef(boolean writeEOL, String format, Object... args)
writeEOL
- write end of line.format
- format string.args
- arguments.protected void writeHeaderField(VTSHeaderInfo headerInfo, VTSHeaderInfo.VTSHeaderItemIterface headerItem)
headerInfo
- header info map.headerItem
- item to write.protected void writeHeaderComment(VTSHeaderInfo headerInfo, VTSHeaderInfo.VTSHeaderItemIterface headerItem)
headerInfo
- header info map.headerItem
- item to write.protected boolean isHeaderWritten()
Copyright © 2024. All rights reserved.