Class FileDataSet
- java.lang.Object
-
- org.apache.camel.component.dataset.DataSetSupport
-
- org.apache.camel.component.dataset.ListDataSet
-
- org.apache.camel.component.dataset.FileDataSet
-
- All Implemented Interfaces:
DataSet
public class FileDataSet extends ListDataSet
A DataSet that reads payloads from a file that are used to create each message exchange along with using a pluggable transformer to customize the messages. The file contents may optionally be split using a supplied token.
-
-
Constructor Summary
Constructors Constructor Description FileDataSet(File sourceFile)
FileDataSet(File sourceFile, String delimiter)
FileDataSet(String sourceFileName)
FileDataSet(String sourceFileName, String delimiter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDelimiter()
File
getSourceFile()
void
setSourceFile(File sourceFile)
void
setSourceFile(File sourceFile, String delimiter)
-
Methods inherited from class org.apache.camel.component.dataset.ListDataSet
createMessageBody, getDefaultBodies, setDefaultBodies
-
Methods inherited from class org.apache.camel.component.dataset.DataSetSupport
applyHeaders, assertMessageExpected, getDefaultHeaders, getOutputTransformer, getReportCount, getSize, populateDefaultHeaders, populateMessage, setDefaultHeaders, setOutputTransformer, setReportCount, setSize
-
-
-
-
Constructor Detail
-
FileDataSet
public FileDataSet(String sourceFileName) throws IOException
- Throws:
IOException
-
FileDataSet
public FileDataSet(File sourceFile) throws IOException
- Throws:
IOException
-
FileDataSet
public FileDataSet(String sourceFileName, String delimiter) throws IOException
- Throws:
IOException
-
FileDataSet
public FileDataSet(File sourceFile, String delimiter) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getSourceFile
public File getSourceFile()
-
setSourceFile
public void setSourceFile(File sourceFile) throws IOException
- Throws:
IOException
-
setSourceFile
public void setSourceFile(File sourceFile, String delimiter) throws IOException
- Throws:
IOException
-
getDelimiter
public String getDelimiter()
-
-