Menu
Topics Index
...
`


Input/Output: Exploring java.io > Serialization >
Siva Nookala - 15 Apr 2016
ObjectOutput is an interface extends the DataOutput interface to include writing of objects to a stream. DataOutput includes methods to write all primitive data types as objects to a stream.

ObjectOutput stream has the following methods :
Method Description
void writeObject(Object obj) Writes an object to the underlying storage or stream.
void write(byte[] b) Writes an array of bytes.
void write(int b) Writes a byte.
void flush() Flushes the stream.
void close() Closes the stream.
All the above methods throws IOException. So the calling method should handle the exception.

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App