Interface: java.io.ObjectOutput
- public interface ObjectOutput
- extends DataOutput
ObjectOutput extends the DataOutput interface to include writing of objects.
DataOutput includes methods for output of primitive types, ObjectOutput
extends that interface to include objects, arrays, and Strings.
Methods
-
closetop
public void close() throws IOExceptionCloses the stream. This method must be called to release any resources associated with the stream. -
flushtop
public void flush() throws IOExceptionFlushes the stream. This will write any buffered output bytes. -
writetop
public void write(int b) throws IOExceptionWrites a byte. This method will block until the byte is actually written.- Specified by:
- write from DataOutput
-
writetop
public void write(byte[] b) throws IOExceptionWrites an array of bytes. This method will block until the bytes are actually written.- Specified by:
- write from DataOutput
-
writetop
public void write(byte[] b, int off, int len) throws IOExceptionWrites a sub array of bytes.- Specified by:
- write from DataOutput
-
writeObjecttop
public void writeObject(Object obj) throws IOExceptionWrite an object to the underlying storage or stream. The class that implements this interface defines how the object is written.
