70. |
Explain the terms ObjectInput, ObjectInputStream, ObjectOutput and ObjectOutputStream? |
|
- ObjectInput – ObjectInput is an interface that extends the DataInput interface. It supports object serialization and defines the readobject() method to deserialize an object. All the methods defined in this interface throw an IOException.
-
ObjectInputStream – It is a class that extends the InputStream class and implements ObjectInput Interface. It is responsible for reading objects from a stream. The constructor of this class is
ObjectInputStream( InputStream inStream) throws IOException, streamCorruptedException. - ObjectOutput – The ObjectOutput is an interface that extends the DataOutput interface and supports object serialization. It defines the writeObject () method to serialize an object.
- ObjectOutputStream – The ObjectOutputStream class extends the OutputStream class and implements the ObjectOutput interface. It is responsible for writing objects to a stream. The constructor of this class is
ObjectOutputStream( OutputStream outstream) throws IOException. - The argument outStream is the output stream to which serialized objects will be written.
|
|
|