Object Serialization

Object Serialization extends the core Java Input/Output classes with support for objects. Object Serialization supports the encoding of objects, and the objects reachable from them, into a stream of bytes; and it supports the complementary reconstruction of the object graph from the stream. Serialization is used for lightweight persistence and for communication via sockets or Remote Method Invocation (RMI). The default encoding of objects protects private and transient data, and supports the evolution of the classes. A class may implement its own external encoding and is then solely responsible for the external format.

Serialization now includes an API that allows the serialized data of an object to be specified independently of the fields of the class and allows those serialized data fields to be written to and read from the stream using the existing protocol to ensure compatiblity with the default writing and reading mechanisms. Enhancements

  • Enhancements in J2SE 1.4 - Describes enhancements and improvements to Object Serialization in J2SE 1.4.
  • Previous Enhancements - Describes enhancements to Object Serialization made in previous releases of the Java 2 Platform.
Specification
  • Specification - Describes the architecture of the Object Serialization system and the APIs.  The specification is also available in PS and PDF formats.
API Specification
(javadoc)
  • Package - Documents all of the interfaces and classes.
Examples
  • Examples- Demonstrate different aspects of and uses for Object Serialization.
FAQ
  • FAQ- Answers the most frequently asked questions about Object Serialization.
 Tools
  • serialver - Explains the serialver command, which returns the serialVersionUID for a class.