title: Spring: using of FlatFileItemReader
body: <p>Could I use FlatFileItemReader not as reader of batch processing? I want to use it for parsing of File.</p>
  
  <p>I have bean of reader:</p>
  
  <pre><code>&lt;bean id="cvsFileItemReader" class="org.springframework.batch.item.file.FlatFileItemReader"&gt;
      &lt;property name="resource" value="file:${garmin.fs.in.received2}" /&gt;
      &lt;property name="lineMapper"&gt;
          &lt;bean class="org.springframework.batch.item.file.mapping.DefaultLineMapper"&gt;
              &lt;property name="lineTokenizer"&gt;
                  &lt;bean class="org.springframework.batch.item.file.transform.DelimitedLineTokenizer"&gt;
                      &lt;property name="names" value="id,sales,qty,staffName,date" /&gt;
                  &lt;/bean&gt;
              &lt;/property&gt;
              &lt;property name="fieldSetMapper"&gt;
                  &lt;bean class="my.app.util.ReportFieldSetMapper" /&gt;
              &lt;/property&gt;
          &lt;/bean&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>And I want to use it in my component:</p>
  
  <pre><code>@Component
  public class Handler {
  
      @Autowired
      private FlatFileItemReader&lt;Report&gt; reader;
  
      public File handleFile() {
          try {
              Report report = reader.read();
          } catch (Exception e) {
              e.printStackTrace();
          }
          return input;
      }          
  }
  </code></pre>
  
  <p>But in line of code:</p>
  
  <pre><code>Report report = reader.read();
  </code></pre>
  
  <p>I got exception:</p>
  
  <p>org.springframework.batch.item.ReaderNotOpenException: Reader must
      be open before it can be read.</p>
  
  <p>Is it possible to use spring batch reader in the following way?</p>