import com.tropo.persist.*;
...
PersistentMap pm = new PersistentMap( "zip"); // 'zip' is base of file name, def key is String
pm.put( "one", "A"); // pm is-a Map
pm.put( "two", "AB");
pm.put( "three", "ABC");
pm.commit(); // there are a few additional methods such as commit() (flush to disk), close(), and setFlushFreq (for periodic writes to disk)
PersistentMap pm2 = new PersistentMap( "zip"); // now pm2 has the same contents as pm
...
|