Hi I would then not use the splitter, but you can use a java bean / processor and read the file by line and read the first and then validate it.
Java has API for a LineNumberReader or something like that so you can read the file one line at a time. On Mon, Apr 6, 2015 at 6:09 PM, manojdevendran <manojdevend...@gmail.com> wrote: > How can I stop the split after reading the first line of a file? > > Looking for something like "break" in the for loop. > > The requirement is to read and validate first line from a large file. Please > let me know if any suggestions. > > Thanks in advance!! > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Stop-split-after-reading-first-line-tp5765370.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/