遇到問題?歡迎訪問GitHub頁面提交Issue https://github.com/SumiMakito/QuickKV ,同時也歡迎收藏項目新建實例
QuickKV quickKv = new QuickKV(this);
默認工作目錄: Context.getFilesDir();
quickKv.setWorkspace("/tmp");
在0.8新版本中,我們移除了可持續(xù)化KV數(shù)據(jù)庫。我們將主要功能合并進了KeyValueDatabase?,F(xiàn)在,QuickKV變得更易用!
kvdb = quickKv.getDatabase(); // --> database.qkv kvdb = quickKv.getDatabase(true); // --> database.qkv (gzip) kvdb = quickKv.getDatabase("CustomName"); // --> CustomName.qkv kvdb = quickKv.getDatabase("CustomName.db"); // --> CustomName.db kvdb = quickKv.getDatabase("CustomName", true); // --> CustomName.qkv (gzip-enabled) kvdb = quickKv.getDatabase("", "Password"); // --> database.qkv (encrypted) kvdb = quickKv.getDatabase("CustomName", "Password"); // --> CustomName.qkv (encrypted) kvdb = quickKv.getDatabase("CustomName", "Password", true); // --> CustomName.qkv (encrypted+gzip)
quickKv.setWorkspace("/tmp"); // IMPORTANT: Must set workspace first!! hckvdb = quickKv.getHCKVDB("CustomName"); // --> /tmp/CustomName hckvdb = quickKv.getHCKVDB("CustomName.db"); // --> /tmp/CustomName.db
qkvdb.put(k,v); //Put everything as you like
qkvdb.put(hashMap); //Auto filled
qkvdb.get("something_key"); // or more specific ... (1.0.2+) qkvdb.getString("a_string"); qkvdb.getInt("an_int");
qkvdb.remove("key");
更多建議: