Storing objects w/ jdbm

Hi,

This isn't really a jigsaw related question, but since jdbm is included
with the jigsaw package i'm asking it here anyway.
In the original gdbm package in C, it's possible storing/retrieving any
datatype. Storing a big structure and retrieving it by casting back to the
original datatype is possible. Very handy feature.
Would it be possible doing this with jdbm as well? Would there be an easy
way to store an object that is an instance of a dataholder class?
Right now i see a way to store a String object because the String class
defines methods to get a byte array copy of its value and giving it a
value using a byte array copy of the desired value. How would i clone a
random object to a byte-array so that i can store it using jdbm? And how
would i create an instance back from the byte-array to the object?

If anyone already did this, please let me know,

Martijn

Received on Monday, 4 November 1996 08:01:34 UTC