title: Writing to a file in Tasklet step in Spring batch
body: <p>My requirement is to write all the error records into a file after batch execution. Applications stores all error records in a Map and finally it needs to be written into a file.
  After batch core step is done, I call this tasklet as a nextstep.
  Is there a better way to write the records in the tasklet ? rather than traditional FileStreamWriter ?
  Possible to use FileItemWriter inside tasklet?</p>