> Finally I have created a processor with a BufferedReader to filter the
> lines of the file according to a regular expression, so I get the file
> as String only with the important lines. Later, I use bindy as usual.
Instead of reading the file by myself using a BufferedReader I would check
the line content inside the route, something like
from("file:data.csv")
// http://camel.apache.org/splitter.html
.split().tokenize("\n")
.choice()
// http://camel.apache.org/simple.html
.when(simple("$body regex ..."))
// http://camel.apache.org/bindy.html
.marshal().bindy(BindyType.Csv, "my.pack.age.with.data.model")
.to("direct:process")
.otherwise()
.to("direct:ignore")
Jan