Main Page | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Related Pages

com::sleepycat::bind::serial::SerialOutput Class Reference


Public Member Functions

 SerialOutput (OutputStream out, ClassCatalog classCatalog) throws IOException

Static Public Member Functions

static byte[] getStreamHeader ()

Detailed Description

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.

Author:
Mark Hayes

Definition at line 41 of file SerialOutput.java.


Constructor & Destructor Documentation

com::sleepycat::bind::serial::SerialOutput::SerialOutput OutputStream  out,
ClassCatalog  classCatalog
throws IOException [inline]
 

Creates a serial output stream.

Parameters:
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.

Definition at line 70 of file SerialOutput.java.


Member Function Documentation

static byte [] com::sleepycat::bind::serial::SerialOutput::getStreamHeader  )  [inline, static]
 

Returns the fixed stream header used for all serialized streams in PROTOCOL_VERSION_2 format. To save space this header can be removed and serialized streams before storage and inserted before deserializing. SerialOutput always uses PROTOCOL_VERSION_2 serialization format to guarantee that this header is fixed. SerialBinding removes this header from serialized streams automatically.

Returns:
the fixed stream header.

Definition at line 111 of file SerialOutput.java.


The documentation for this class was generated from the following file:
Generated on Sun Dec 25 12:14:58 2005 for Berkeley DB 4.4.16 by  doxygen 1.4.2