Package org.openforis.commons.io.flat
Class FlatDataWriter
- java.lang.Object
-
- org.openforis.commons.io.csv.CsvProcessor
-
- org.openforis.commons.io.flat.FlatDataWriter
-
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
CsvWriter,ExcelFlatValuesWriter
public abstract class FlatDataWriter extends CsvProcessor implements Closeable
- Author:
- G. Miceli, S. Ricci
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanheadersWrittenprotected longlinesWritten
-
Constructor Summary
Constructors Constructor Description FlatDataWriter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidclose()abstract voidflush()longgetLinesWritten()booleanisHeadersWritten()voidwriteAll(FlatDataStream in)voidwriteHeaders(String[] headers)voidwriteHeaders(List<String> headers)voidwriteNext(Object[] line)voidwriteNext(List<String> line)voidwriteNext(FlatRecord r)protected abstract voidwriteNextInternal(Object[] line)-
Methods inherited from class org.openforis.commons.io.csv.CsvProcessor
getDateFormat, getFieldNames, getFields, setDateFormat, setDateFormat, setFieldNames, setFields, setFields
-
-
-
-
Method Detail
-
writeAll
public void writeAll(FlatDataStream in) throws IOException
- Throws:
IOException
-
flush
public abstract void flush() throws IOException- Throws:
IOException
-
close
public abstract void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
writeNext
public void writeNext(FlatRecord r)
-
writeNext
public void writeNext(Object[] line)
-
writeNextInternal
protected abstract void writeNextInternal(Object[] line)
-
writeHeaders
public void writeHeaders(String[] headers)
-
getLinesWritten
public long getLinesWritten()
-
isHeadersWritten
public boolean isHeadersWritten()
-
-