title: Is there an smart way to write a fixed length flat file?
body: <p>Is there any framework/library to help writing fixed length flat files in java?</p>
  
  <p>I want to write a collection of beans/entities into a flat file without worrying with convertions, padding, alignment, fillers, etcs</p>
  
  <p>For example, I'd like to parse a bean like:</p>
  
  <pre><code>public class Entity{
      String name = "name"; // length = 10; align left; fill with spaces
      Integer id = 123; // length = 5; align left; fill with spaces
      Integer serial = 321 // length = 5; align to right; fill with '0'
      Date register = new Date();// length = 8; convert to yyyyMMdd
  }
  </code></pre>
  
  <p>... into ...</p>
  
  <pre><code>name      123  0032120110505
  mikhas    5000 0122120110504
  superuser 1    0000120101231
  </code></pre>
  
  <p>...</p>