Monday 14 November 2016

Working with ObjectOutputStream



 ObjectOutputStream classextends the OutputStreamclass and implements the ObjectOutputinterface (The ObjectOutputinterface extends the DataOutputinterface and supports object Serialization).
 It is responsible for writing object to a stream.
 A constructor used by ObjectOutputStream is:
ObjectOutputStream (OutputStreamoutStream) throws IOException
Here, outStream is an output stream to which serialized objects will be written.
 There is also an inner class to ObjectOutputStreamcalled PutField. It facilitates the writing of persistent fields.
 Some commonly used methods defined by ObjectOutputStream is:

No comments:
Write comments