title: serialization and deserialization of multiple java objects in a single file
body: <p>I have a scenario where I have multiple HashMap objects which need to be stored in the same text file. 
  for example :</p>
  
  <pre><code>    a.put("01jan", 13);
      a.put("02feb", 13);
      a.put("03march", 13);
      a.put("04apr", 13);
      a.put("05may", 13);
  
      b.put("06june", 12);
      b.put("07july", 12);
      b.put("08aug", 12);
      b.put("09sept", 12);
      b.put("10oct", 12);
  </code></pre>
  
  <p>I would like to use java serialization to save the objects in the same txt file. 
  Is there any way to do this one after the other I have tried using the <code>FileOutputStream( file_name,true)</code>. Also when I try to retrieve objects say <code>HashMap b</code> now and <code>HashMap a</code> when the need arises. Is there any way of achieving this? 
  How do I retrieve <code>out of order</code> objects and retrieve the correct object?</p>
  
  <p>Thanks,
  Bhavya </p>