title: How to dynamically Map the Fieldsets in SpringBatch during file reading?
body: <p>I have the requirement to read the file  with the help of spring batch . But at the time of reading it requires LineMapper . If columns type of file doesn't match it gives error</p>
  
  <p>I want to do it dynamically or skip that step how do i do that?</p>
  
  <pre><code>        DelimitedLineTokenizer lineTokenizer = new DelimitedLineTokenizer();
          lineTokenizer.setNames(new String[] { "col1", "col2", "col3", "col4", "col5" });
          lineTokenizer.setDelimiter(",");
          BeanWrapperFieldSetMapper&lt;InputStream&gt; fieldSetMapper = new BeanWrapperFieldSetMapper&lt;InputStream&gt;();
          fieldSetMapper.setTargetType(InputStream.class);
          fieldSetMapper.setStrict(false);
          DefaultLineMapper&lt;InputStream&gt; lineMapper = new DefaultLineMapper&lt;InputStream&gt;();
          lineMapper.setLineTokenizer(lineTokenizer);
          lineMapper.setFieldSetMapper(fieldSetMapper);
          setLineMapper(lineMapper);
  </code></pre>
  
  <p>Another thing i want </p>
  
  <p>I am using FlatFileItemreader to read the files . This file may be csv,xml,txt format . I want the spring batch reader to dynamically identify the file format and process it accordingly . Can we do that</p>