The Many Uses of Serialization

By now, you should be reasonably familiar with serialization. You know that you mark an object as serializable by implementing java.io.Serializable, and that you mark fields as transient when you don't want them to be serialized. Serialization has a lot of features, however, that can help you improve your code and make your system more robust. There are also many interesting ways to use serialization.

Storing Objects in Files

There are plenty of times when you need to store data in a file so it's available the next time you run your program. For instance, you might need to save the user's preferences or store the application's state data so the application can start right back where it left off.

You have many options ...

Get Special Edition Using Java™ 2 Enterprise Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.