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>

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,

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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:30 UTC