|
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.tuple.TupleBinding | +--com.sleepycat.bdb.bind.tuple.TupleMarshalledBinding
A concrete key or value binding that uses the MarshalledTupleData
interface. It works by calling the methods of the MarshalledTupleData
interface, which must be implemented by the key or
value class, to convert between the key or value data and the object.
use the TupleInput.TupleInput(TupleOutput)
constructor.
Constructor Summary | |
TupleMarshalledBinding(TupleFormat format,
Class cls)
Creates a tuple marshalled binding object. |
Method Summary | |
Object |
dataToObject(TupleInput input)
Constructs a key or value object from TupleInput data. |
void |
objectToData(Object object,
TupleOutput output)
Converts a key or value object to a tuple data. |
Methods inherited from class com.sleepycat.bdb.bind.tuple.TupleBinding |
dataToObject, getDataFormat, getPrimitiveBinding, objectToData |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TupleMarshalledBinding(TupleFormat format, Class cls)
The given class is used to instantiate key or value objects using
Class.forName(java.lang.String)
, and therefore must be a public class and have a
public no-arguments constructor. It must also implement the MarshalledTupleData
interface.
format
- is the format of the new binding.cls
- is the class of the key or value objects.Method Detail |
public Object dataToObject(TupleInput input) throws IOException
TupleBinding
TupleInput
data.
dataToObject
in class TupleBinding
input
- is the tuple key or value data.
IOException
public void objectToData(Object object, TupleOutput output) throws IOException
TupleBinding
objectToData
in class TupleBinding
object
- is the key or value object.output
- is the tuple data to which the key or value should be
written.
IOException
|
Berkeley DB version 4.2.52 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |