加载中...
The Wayback Machine - https://sup1a9wrlpyh5li9ro.vcoronado.top/web/20090427093051/http://developer.android.com:80/reference/java/io/ObjectOutput.html
public interface

ObjectOutput

implements DataOutput
java.io.ObjectOutput
Known Indirect Subclasses

Class Overview

Streams to be used with serialization to write objects must implement this interface. ObjectOutputStream is one example.

Summary

Public Methods
abstract void close()
Close this ObjectOutput.
abstract void flush()
Flush this ObjectOutput.
abstract void write(byte[] buffer)
Writes the entire contents of the byte array buffer to this ObjectOutput.
abstract void write(int value)
Writes the specified int value to this ObjectOutput.
abstract void write(byte[] buffer, int offset, int count)
Writes count bytes from this byte array buffer starting at offset index to this ObjectOutput.
abstract void writeObject(Object obj)
Writes the specified object obj to this ObjectOutput.
[Expand]
Inherited Methods
From interface java.io.DataOutput

Public Methods

public abstract void close ()

Close this ObjectOutput. Concrete implementations of this class should free any resources during close.

Throws
IOException If an error occurs attempting to close this ObjectOutput.

public abstract void flush ()

Flush this ObjectOutput. Concrete implementations of this class should ensure any pending writes are written out when this method is envoked.

Throws
IOException If an error occurs attempting to flush this ObjectOutput.

public abstract void write (byte[] buffer)

Writes the entire contents of the byte array buffer to this ObjectOutput.

Parameters
buffer the buffer to be written
Throws
IOException If an error occurs attempting to write to this ObjectOutput.

public abstract void write (int value)

Writes the specified int value to this ObjectOutput.

Parameters
value the int to be written
Throws
IOException If an error occurs attempting to write to this ObjectOutput.

public abstract void write (byte[] buffer, int offset, int count)

Writes count bytes from this byte array buffer starting at offset index to this ObjectOutput.

Parameters
buffer the buffer to be written
offset offset in buffer to get bytes
count number of bytes in buffer to write
Throws
IOException If an error occurs attempting to write to this ObjectOutput.

public abstract void writeObject (Object obj)

Writes the specified object obj to this ObjectOutput.

Parameters
obj the object to be written
Throws
IOException If an error occurs attempting to write to this ObjectOutput.