W3C home > Mailing lists > Public > www-jigsaw@w3.org > November to December 1996

Storing objects w/ jdbm

From: Martijn <martijn@cruiser.vo.com>
Date: Mon, 4 Nov 1996 13:58:41 +0100 (MET)
To: www-jigsaw@w3.org
Message-ID: <Pine.LNX.3.93.961104134852.284A-100000@martijn.rug.nl>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:25 GMT