O'Reilly logo

Special Edition Using Java™ 2 Enterprise Edition by Mark Wutka

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required