Input and Output Object Streams


ObjectOutputStream is the primary output stream class that implements the ObjectOutput interface for serializing objects.
ObjectInputStream is the primary input stream class that implements the ObjectInput interface for deserializing objects.

These high-level streams are each chained to a low-level stream,
such as FileInputStream or FileOutputStream.
 The low-level streams handle the bytes of data.
 The writeObject method saves the state of the class by writing the individual fields to the ObjectOutputStream.
The readObject method is used to deserialize the object from
 the object input stream.

Comments

Popular Posts