Chapter 12. Serializing Objects

In this chapter, you'll see how you can transfer objects to and from a stream. By the end of this chapter you will have learned:

  • What serialization is and how you make a class serializable

  • How to write objects to a file

  • What transient fields in a class are

  • How to write basic types of data to an object file

  • How to implement the Serializable interface

  • How to read objects from a file

  • How to implement serialization for classes containing objects that are not serializable by default

Get Ivor Horton's Beginning Java™ 2, JDK™ 5th 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.