|
Berkeley DB version 4.2.52 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sleepycat.bdb.bind.serial.SerialFormat
The format for serialized data. In addition to identifying a serial format this class provides utility methods for use by bindings.
Constructor Summary | |
SerialFormat(ClassCatalog classCatalog,
Class baseClass)
Creates a serial format. |
Method Summary | |
Object |
dataToObject(DataBuffer data)
Utility method for use by bindings to deserialize an object. |
Class |
getBaseClass()
Returns the base class for this format. |
void |
objectToData(Object object,
DataBuffer data)
Utility method for use by bindings to serialize an object. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SerialFormat(ClassCatalog classCatalog, Class baseClass)
classCatalog
- is the catalog to hold shared class information and
for a database should be a StoredClassCatalog
.baseClass
- is the base class for serialized objects stored using
this format -- all objects using this format must be an instance of
this class.Method Detail |
public final Class getBaseClass()
public final Object dataToObject(DataBuffer data) throws IOException
objectToData(java.lang.Object, com.sleepycat.bdb.bind.DataBuffer)
,
since the fixed serialization header is assumed to not be included in
the input data. SerialInput
is used to deserialize the object.
If a deserialized object is cached in the buffer's data formation
property, it is returned directly.
data
- is the input serialized data.
IOException
public final void objectToData(Object object, DataBuffer data) throws IOException
dataToObject(com.sleepycat.bdb.bind.DataBuffer)
method must be used. SerialOutput
is used to
serialize the object. The deserialized object is cached in the buffer's
data formation property.
object
- is the input deserialized object.data
- is the output serialized data.
IllegalArgumentException
- if the object is not an instance of the
base class for this format.
IOException
|
Berkeley DB version 4.2.52 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |