|
Berkeley DB Java Edition version 1.5.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.OutputStream | +--java.io.ObjectOutputStream | +--com.sleepycat.bind.serial.SerialOutput
A specialized ObjectOutputStream
that stores class description
information in a ClassCatalog
. It is used by
SerialBinding
.
This class is used instead of an ObjectOutputStream
, which it
extends, to write a compact object stream. For writing objects to a
database normally one of the serial binding classes is used. SerialOutput
is used when an ObjectOutputStream
is needed along
with compact storage. A ClassCatalog
must be supplied, however, to
stored shared class descriptions.
The ClassCatalog
is used to store class definitions rather than
embedding these into the stream. Instead, a class format identifier is
embedded into the stream. This identifier is then used by SerialInput
to load the class format to deserialize the object.
Field Summary |
Constructor Summary | |
SerialOutput(OutputStream out,
ClassCatalog classCatalog)
Creates a serial output stream. |
Method Summary | |
static byte[] |
getStreamHeader()
Returns the fixed stream header used for all serialized streams in PROTOCOL_VERSION_2 format. |
Methods inherited from class java.io.ObjectOutputStream |
close, defaultWriteObject, flush, putFields, reset, useProtocolVersion, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFields, writeFloat, writeInt, writeLong, writeObject, writeShort, writeUnshared, writeUTF |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SerialOutput(OutputStream out, ClassCatalog classCatalog) throws IOException
out
- is the output stream to which the compact serialized objects
will be written.classCatalog
- is the catalog to which the class descriptions for
the serialized objects will be written.Method Detail |
public static byte[] getStreamHeader()
SerialOutput
always uses PROTOCOL_VERSION_2 serialization format
to guarantee that this header is fixed. SerialBinding
removes
this header from serialized streams automatically.
|
Berkeley DB Java Edition version 1.5.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |