ObjectOutput:
The ObjectOutput interface extends the DataOutput interface and supports object serialization. It declares the methods shown in Table 17-5. Remember especially the writeObject ( ) method. This is known as serialize an object. All of these methods will throw an IOException on error conditions.
Methods Description
void close ( ) Closes the invoking stream. Further write attempts will generate an IOException.
void flush ( ) Finalized the output state so that any buffers are cleared That is, it flushes the output buffers.
void write (byte buffer [ ]) Writes an array of bytes to the invoking stream.
void write (byte buffer[ ], Writes a subrange of numBytes bytes
int offset, int num Bytes) from the array buffer, beginning at buffer [offset].
void write (int b ) Writes a single byte to the invoking stream. The Byte written is the low-order byte of b.
void writeObject (Object obj) Writes object obj to the invoking stream.