Code example for Preferences

Methods: get

0
    private Preferences pref;
    private static final String def = "";
     
    private DirectoryCache() { 
        pref = Preferences.userRoot().node("VitaCut");
        openDir = pref.get("openDir", def);
        saveDir = pref.get("saveDir", def);
    } 
     
    public String getOpenDir() {
        return openDir;
    } 
     
    public String getSaveDir() {
        return saveDir;
    } 
     
    public void setOpenDir(String str) {
        pref.put("openDir", openDir = str);
    }