In Java, the process which converts an object into a stream of bytes.

The classes ObjectInputStream and ObjectOutputStream provide methods to read/write objects from/to a simple stream (e.g. a file). The state of an object can thus be saved easily, and later restored. The object must be marked as serializable, by implementing the Serializable interface.