Inheritance diagram for com::sleepycat::bind::serial::SerialBinding:
Public Member Functions | |
SerialBinding (ClassCatalog classCatalog, Class baseClass) | |
final Class | getBaseClass () |
ClassLoader | getClassLoader () |
Object | entryToObject (DatabaseEntry entry) |
void | objectToEntry (Object object, DatabaseEntry entry) |
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.
Definition at line 31 of file SerialBinding.java.
|
Creates a serial binding.
Definition at line 46 of file SerialBinding.java. |
|
Deserialize an object from an entry buffer. May only be called for data that was serialized using objectToEntry, since the fixed serialization header is assumed to not be included in the input data. SerialInput is used to deserialize the object.
Implements com::sleepycat::bind::EntryBinding. Definition at line 97 of file SerialBinding.java. References getClassLoader(). Referenced by com::sleepycat::bind::serial::TupleSerialBinding::entryToObject(), com::sleepycat::bind::serial::SerialSerialBinding::entryToObject(), and com::sleepycat::bind::serial::test::SerialBindingTest::testClassloaderOverride(). |
|
Returns the base class for this binding.
Definition at line 60 of file SerialBinding.java. |
|
Returns the class loader to be used during deserialization, or null if a default class loader should be used. The default implementation of this method returns null.
This method may be overriden to return a dynamically determined class loader. For example,
If this method returns null, a default class loader will be used as determined by the Definition at line 82 of file SerialBinding.java. Referenced by entryToObject(). |
|
Serialize an object into an entry buffer. The fixed serialization header is not included in the output data to save space, and therefore to deserialize the data the complementary entryToObject method must be used. SerialOutput is used to serialize the object. Note that this method sets the DatabaseEntry offset property to a non-zero value and the size property to a value less than the length of the byte array.
Implements com::sleepycat::bind::EntryBinding. Definition at line 137 of file SerialBinding.java. References com::sleepycat::util::FastOutputStream::getBufferBytes(), com::sleepycat::util::FastOutputStream::getBufferLength(), and com::sleepycat::bind::serial::SerialBase::getSerialOutput(). Referenced by com::sleepycat::bind::serial::TupleSerialBinding::objectToData(), com::sleepycat::bind::serial::SerialSerialBinding::objectToData(), com::sleepycat::bind::serial::SerialSerialBinding::objectToKey(), and com::sleepycat::bind::serial::test::SerialBindingTest::testClassloaderOverride(). |