Package step.datapool.file
Class CSVReaderDataPool
- java.lang.Object
-
- step.datapool.DataSet<FileDataPool>
-
- step.datapool.file.FileReaderDataPool
-
- step.datapool.file.CSVReaderDataPool
-
public class CSVReaderDataPool extends FileReaderDataPool
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
CSVReaderDataPool.CSVRowWrapper
-
Field Summary
Fields Modifier and Type Field Description protected String
delimiter
protected AtomicBoolean
hasChanges
protected Vector<String>
headers
static org.slf4j.Logger
logger
protected File
tempFile
protected PrintWriter
tempFileWriter
-
Fields inherited from class step.datapool.DataSet
closing, configuration, context, isRowCommitEnabled
-
-
Constructor Summary
Constructors Constructor Description CSVReaderDataPool(CSVDataPool configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRow(Object row)
void
close()
void
doFirst_()
Vector<String>
getHeaders(String readOneLine)
void
init()
protected boolean
isWriteQueueSupportEnabled()
Object
postProcess(String line)
Vector<String>
splitCSV(String readOneLine)
void
writeRow(DataPoolRow row)
-
Methods inherited from class step.datapool.file.FileReaderDataPool
next_, readOneLine, reset
-
Methods inherited from class step.datapool.DataSet
enableRowCommit, next, save, setContext
-
-
-
-
Field Detail
-
logger
public static final org.slf4j.Logger logger
-
delimiter
protected String delimiter
-
hasChanges
protected AtomicBoolean hasChanges
-
tempFile
protected File tempFile
-
tempFileWriter
protected PrintWriter tempFileWriter
-
-
Constructor Detail
-
CSVReaderDataPool
public CSVReaderDataPool(CSVDataPool configuration)
-
-
Method Detail
-
init
public void init()
- Overrides:
init
in classFileReaderDataPool
-
close
public void close()
- Overrides:
close
in classFileReaderDataPool
-
writeRow
public void writeRow(DataPoolRow row) throws IOException
- Overrides:
writeRow
in classDataSet<FileDataPool>
- Throws:
IOException
-
isWriteQueueSupportEnabled
protected boolean isWriteQueueSupportEnabled()
- Overrides:
isWriteQueueSupportEnabled
in classDataSet<FileDataPool>
-
postProcess
public Object postProcess(String line)
- Specified by:
postProcess
in classFileReaderDataPool
-
doFirst_
public void doFirst_()
- Specified by:
doFirst_
in classFileReaderDataPool
-
addRow
public void addRow(Object row)
- Specified by:
addRow
in classDataSet<FileDataPool>
-
-