Advantages of serialization in Java