public class FlatFileItemWriter<T> extends AbstractFileItemWriter<T>
Resource
and must represent a writable file.AbstractFileItemWriter.OutputState
Modifier and Type | Field and Description |
---|---|
protected LineAggregator<T> |
lineAggregator |
append, DEFAULT_CHARSET, DEFAULT_LINE_SEPARATOR, DEFAULT_TRANSACTIONAL, lineSeparator, logger, shouldDeleteIfExists, state
Constructor and Description |
---|
FlatFileItemWriter() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet()
Assert that mandatory properties (lineAggregator) are set.
|
java.lang.String |
doWrite(java.util.List<? extends T> items)
Write out a string of items followed by a "new line", where the format of the new
line separator is determined by the underlying operating system.
|
void |
setLineAggregator(LineAggregator<T> lineAggregator)
Public setter for the
LineAggregator . |
close, getOutputState, open, setAppendAllowed, setEncoding, setFooterCallback, setForceSync, setHeaderCallback, setLineSeparator, setResource, setSaveState, setShouldDeleteIfEmpty, setShouldDeleteIfExists, setTransactional, update, write
getExecutionContextKey, getName, setExecutionContextName, setName
protected LineAggregator<T> lineAggregator
public void afterPropertiesSet() throws java.lang.Exception
java.lang.Exception
InitializingBean.afterPropertiesSet()
public void setLineAggregator(LineAggregator<T> lineAggregator)
LineAggregator
. This will be used to
translate the item into a line for output.lineAggregator
- the LineAggregator
to setpublic java.lang.String doWrite(java.util.List<? extends T> items)
AbstractFileItemWriter
doWrite
in class AbstractFileItemWriter<T>
items
- to be written