title: Uses of readObject/writeObject in Serialization
body: <p>I was going through <a href="http://www.oracle.com/technetwork/articles/java/javaserial-1536170.html" rel="nofollow noreferrer">this article</a> to understand more about Java Serialization process. When it comes to uses of <code>readObject/writeObject</code> I could see two use cases:</p>
  
  <ol>
  <li>We can use <code>writeObject</code> to encrypt the byte code before it gets serialized. From the security point of view, that's good thing.</li>
  <li>we can use <code>readObject</code> to execute any specific piece of code that need to execute immediately after deserialization, and off course from poin#1, we can even use <code>readObject</code> to decrypt the byte code that was excrypted while serializing the object.</li>
  </ol>
  
  <p>Is there any other practical scenario you've come across while serializing/deserializing objects by writing customr readObject/writeObject method? Or If you could point me to any place where I could see some decent and practical uses of readObject/writeObject?</p>