title: Apache Camel: How to look inside body to determine file format
body: <p>We receive .csv files (both via ftp and email) each of which can be one of a few different formats (that can be determined by looking at the top line of the file).  I am fairly new to Apache Camel but want to implement a content based router and unmarshal each to the relevant class.</p>
  
  <p>My current solution is to break down the files to a lists of strings, manually use the first line to determine the type of file, and then use the rest of the strings to create relevant entity instances.</p>
  
  <p>Are there a cleaner and better way?</p>