Example usage for java.util.prefs Preferences get

List of usage examples for java.util.prefs Preferences get

Introduction

In this page you can find the example usage for java.util.prefs Preferences get.

Prototype

public abstract String get(String key, String def);

Source Link

Document

Returns the value associated with the specified key in this preference node.

Usage

From source file:de.innovationgate.wgpublisher.WGACore.java

private String getLastCharacterEncoding() {
    Preferences prefs = Preferences.userNodeForPackage(this.getClass());
    return prefs.get("LastCharacterEncoding", null);
}

From source file:de.innovationgate.wgpublisher.WGACore.java

private String getLastDesignEncoding(String dbkey) {
    Preferences prefs = Preferences.userNodeForPackage(this.getClass());
    try {//from  w ww.ja v a  2  s.  c  om
        return prefs.get(createPrefKeyDesignEncoding(dbkey), null);
    } catch (Exception e) {
        log.error("Unable to retrieve preferences for 'LastDesignEncoding'", e);
        return null;
    }
}