|
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 | +--com.sleepycat.bind.serial.SerialBinding
A concrete EntryBinding
that treats a key or data entry as
a serialized object.
This binding stores objects in serialized object format. The
deserialized objects are returned by the binding, and their
Class
must implement the Serializable
interface.
Constructor Summary | |
SerialBinding(ClassCatalog classCatalog,
Class baseClass)
Creates a serial binding. |
Method Summary | |
Object |
entryToObject(DatabaseEntry entry)
Deserialize an object from an entry buffer. |
Class |
getBaseClass()
Returns the base class for this binding. |
void |
objectToEntry(Object object,
DatabaseEntry entry)
Serialize an object into an entry buffer. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SerialBinding(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 binding -- all objects using this binding must be an instance of
this class.Method Detail |
public final Class getBaseClass()
public Object entryToObject(DatabaseEntry entry)
objectToEntry(java.lang.Object, com.sleepycat.je.DatabaseEntry)
, since the fixed
serialization header is assumed to not be included in the input data.
SerialInput
is used to deserialize the object.
entryToObject
in interface EntryBinding
entry
- is the input serialized entry.
public void objectToEntry(Object object, DatabaseEntry entry)
entryToObject(com.sleepycat.je.DatabaseEntry)
method
must be used. SerialOutput
is used to serialize the object.
objectToEntry
in interface EntryBinding
object
- is the input deserialized object.entry
- is the output serialized entry.
IllegalArgumentException
- if the object is not an instance of the
base class for this binding.
|
Berkeley DB Java Edition version 1.5.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |