I am looking for the simplest key-value store that would allow me to save and retrieve custom objects to/from a file, for example:
Set obj1;
Map obj2;
...
Store.saveObject(obj1, "mySet", "myFile.dat");
Store.saveObject(obj2, "myMap", "myFile.dat");
...
obj1 = (Set) Store.getObject("mySet", "myFile.dat");
obj2 = (Map) Store.getObject("myMap", "myFile.dat");
Where obj1 and obj2 are just example objects, "mySet" and "myMap" are keys, "myFile.dat" is the file. Is there any library close to this in simplicity? Example code equivalent to my code would be appreciated.