Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
You sometimes need to persist objects in memory into permanent storage so that the states of the objects can be retained and later retrieved. Java supports this through object serialization. To serialize objects, i.e. to save objects to permanent storage, you use an ObjectOutputStream. To deserialize objects, namely to retrieved saved objects, use ObjectInputStream. ObjectOutputStream is a subclass of OutputStream and ObjectInputStream is derived from InputStream.
The ObjectOutputStream class has one public constructor: