Known Indirect Subclasses
| ObjectOutputStream |
An ObjectOutputStream can be used to save Java objects into a stream where
the objects can be loaded later with an ObjectInputStream. |
|
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
|
abstract
void
|
write(int oneByte)
Writes the specified byte to the OutputStream.
|
|
abstract
void
|
write(byte[] buffer)
Writes the entire contents of the byte array buffer to the
OutputStream.
|
|
abstract
void
|
write(byte[] buffer, int offset, int count)
Writes count bytes from the byte array
buffer starting at offset index to the
OutputStream.
|
|
abstract
void
|
writeBoolean(boolean val)
Writes a boolean to this output stream.
|
|
abstract
void
|
writeByte(int val)
Writes a 8-bit byte to this output stream.
|
|
abstract
void
|
writeBytes(String str)
Writes the low order 8-bit bytes from a String to this output stream.
|
|
abstract
void
|
writeChar(int oneByte)
Writes the specified 16-bit character to the OutputStream.
|
|
abstract
void
|
writeChars(String str)
Writes the specified 16-bit characters contained in str to the
OutputStream.
|
|
abstract
void
|
writeDouble(double val)
Writes a 64-bit double to this output stream.
|
|
abstract
void
|
writeFloat(float val)
Writes a 32-bit float to this output stream.
|
|
abstract
void
|
writeInt(int val)
Writes a 32-bit int to this output stream.
|
|
abstract
void
|
writeLong(long val)
Writes a 64-bit long to this output stream.
|
|
abstract
void
|
writeShort(int val)
Writes the specified 16-bit short to the OutputStream.
|
|
abstract
void
|
writeUTF(String str)
Writes the specified String out in UTF format.
|
|
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.
|