title: Java Serialization empty file
body: <p>I have some java serialization code. It compiles and ran properly. But the resultant file is empty. Below is my code</p>
  
  <p>The parameters are either arraylist of integers, arraylist of Strings or arraylist of arraylists of integers</p>
  
  <pre><code>Model model = new Model(
      pennTreeTags,
      tagsCount,
      iOccurTable,
      fOccurTable,
      alVocab,
      aiVocabCount,
      wordTagTable,
      fWordTagProb
  );
  
  try 
  {
      FileInputStream fileIn = new FileInputStream(argv[2]);
      ObjectInputStream in = new ObjectInputStream(fileIn);
      model = (Model) in.readObject();
      in.close();
      fileIn.close();
  }
  catch (EOFException ex) 
  { 
      //This exception will be caught when EOF is reached
      System.out.println("End of file reached.");
  }
  catch(IOException i)
  {
      i.printStackTrace();
      return;
  }
  catch(ClassNotFoundException c)
  {
      System.out.println("Model class not found");
      c.printStackTrace();
      return;
  }
  </code></pre>