Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Java equivalents to dbm/gdbm libraries?



While I appreciate the suggestion, the whole point is to avoid having to read all of the data into memory. Even if the total amount of data is relatively small (say 5 megabytes), that can incur quite a significant startup cost. When the data gets to 50 meg, it is simply not feasible. But with dbm/gdbm/jdbm, it's trivial and painless. I just want to ensure that I use the "most standard" solution, since Sun hasn't included anything in the standard libraries.

Subject: Re: Java equivalents to dbm/gdbm libraries?
From: Edward Kenworthy <email@hidden>
To: email@hidden

On Thursday, November 28, 2002, at 01:50 am, kmmcdonald wrote:

I'm working on a project for which I want to use a Java library which
lets me treat an on-disk file as a very large HashMap--basically, the
equivalent of what dbm/gdbm can do in C, as typified by Python's
'pickle' module.

If you don't mind the whole file being read into memory the
java.util.HashMap is serialisable so you could use that. If you want
the file to be human readable/editable then java.util.Properties is
another option. If you want to treat a text file as a database have a
look at the text JDBC driver.
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.