// if file doesn't exist, make it read-only
if(readonly && !new File(f+JDBM_SUFFIX ).exists())
readonly = false;
// init record manager
DBMaker d = DBMaker.openFile(f);
// set options
d.disableTransactions();
d.closeOnExit();
d.enableMRUCache();
d.useRandomAccessFile();
//d.enableHardCache();
//d.disableCache();
if(readonly){
d.disableLocking();
d.readonly();
}
db = d.make();
// create or load hashtable from given file
map = db.getHashMap(tablename);
if(map == null)
map = db.createHashMap(tablename);