Android Open Source - BluetoothSppPro C K V Storage






From Project

Back to project page BluetoothSppPro.

License

The source code is released under:

Apache License

If you think the Android project BluetoothSppPro listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package mobi.dzs.android.storage;
//w w w  . j a  va  2 s .  c  o m
/**
 * KV?????
 * key -> val ???????? key????????????????
 * @author JerryLi(lijian@dzs.mobi)
 * @version
 * <li>1.0 (2014-04-25)create</li>
 * @see<pre>
 * CKVStorage ds = new CSharedPreferences(this);
 * if (ds.isReady())
 *   //??????????????
 * else
 *   //????????
 * </pre>
 */
public abstract class CKVStorage {
  /** ???????? ??*/
  protected boolean _bSrorageIsReady = false;
  /**
   * ????????????
   * @return false:????? / true:??????
   */
  public boolean isReady(){
    return this._bSrorageIsReady;
  }
  /**
   * ??????????
   * @return boolean false:????
   * @see setVal()?????????????????
   * */
  public abstract boolean saveStorage();
  /**
   * ???K-V??
   * @param sKey String ????
   * @param sSubKey String ?????
   * @param sVal String ????????
   * @see ???saveStorage()?????????????????????????
   * @return CKVStorage
   * */
  public abstract CKVStorage setVal(String sKey, String sSubKey, String sVal);
  /**
   * ???K-V??
   * @param sKey String ????
   * @param sSubKey String ?????
   * @param iVal int ???????
   * @see ???saveStorage()?????????????????????????
   * @return CKVStorage
   * */
  public abstract CKVStorage setVal(String sKey, String sSubKey, int iVal);
  /**
   * ???K-V??
   * @param sKey String ????
   * @param sSubKey String ?????
   * @param dbVal getDoubleVal ???????
   * @see ???saveStorage()?????????????????????????
   * @return CKVStorage
   * */
  public abstract CKVStorage setVal(String sKey, String sSubKey, double dbVal);
  /**
   * ???K-V??
   * @param sKey String ????
   * @param sSubKey String ?????
   * @param lVal ???????
   * @see ???saveStorage()?????????????????????????
   * @return CKVStorage
   * */
  public abstract CKVStorage setVal(String sKey, String sSubKey, long lVal);
  /**
   * ???K-V??
   * @param sKey String ????
   * @param sSubKey String ?????
   * @param bVal ???????
   * @see ???saveStorage()?????????????????????????
   * @return CKVStorage
   * */
  public abstract CKVStorage setVal(String sKey, String sSubKey, boolean bVal);
  /**
   * ????K???
   * @param sKey String ????
   * @param sSubKey String ?????
   * @return String ???????  ""
   * */
  public abstract String getStringVal(String sKey, String sSubKey);
  /**
   * ????K???
   * @param sKey String ????
   * @param sSubKey String ?????
   * @return float /??????? 0.0f
   * */
  public abstract double getDoubleVal(String sKey, String sSubKey);
  /**
   * ????K???
   * @param sKey String ????
   * @param sSubKey String ?????
   * @return int /???????0
   * */
  public abstract int getIntVal(String sKey, String sSubKey);
  /**
   * ????K???
   * @param sKey String ????
   * @param sSubKey String ?????
   * @return long /???????0
   * */
  public abstract long getLongVal(String sKey, String sSubKey);
  /**
   * ????K???
   * @param sKey String ????
   * @param sSubKey String ?????
   * @return boolean /??????? false
   * */
  public abstract boolean getBooleanVal(String sKey, String sSubKey);
  /**
   * ??KV?
   * @param sKey String ????
   * @param sSubKey String ?????
   * @see ???saveStorage()?????????????????????????
   * @return CKVStorage
   */
  public abstract CKVStorage removeVal(String sKey, String sSubKey);
}




Java Source Code List

mobi.dzs.android.BLE_SPP_PRO.BaseActivity.java
mobi.dzs.android.BLE_SPP_PRO.BaseCommActivity.java
mobi.dzs.android.BLE_SPP_PRO.actAbout.java
mobi.dzs.android.BLE_SPP_PRO.actByteStream.java
mobi.dzs.android.BLE_SPP_PRO.actCmdLine.java
mobi.dzs.android.BLE_SPP_PRO.actDiscovery.java
mobi.dzs.android.BLE_SPP_PRO.actKeyBoard.java
mobi.dzs.android.BLE_SPP_PRO.actMain.java
mobi.dzs.android.BLE_SPP_PRO.globalPool.java
mobi.dzs.android.bluetooth.BTSerialComm.java
mobi.dzs.android.bluetooth.BluetoothCtrl.java
mobi.dzs.android.bluetooth.BluetoothSppClient.java
mobi.dzs.android.bluetooth.CResourcePV.java
mobi.dzs.android.control.button.ButtonPassListener.java
mobi.dzs.android.control.button.RepeatingButton.java
mobi.dzs.android.storage.CJsonStorage.java
mobi.dzs.android.storage.CKVStorage.java
mobi.dzs.android.storage.CSharedPreferences.java
mobi.dzs.android.util.CHexConver.java
mobi.dzs.android.util.LocalIOTools.java