Code example for Preferences

Methods: get

0
        preferences = Preferences.userRoot().node(nodePath);
    } 
 
    @Override 
    protected String load(String name) {
        return preferences.get(name, null);
    } 
 
    @Override 
    protected void store(Map<String, String> stringOptionMap) throws IOException {
        try { 
            for (Entry<String, String> e : stringOptionMap.entrySet()) {
                preferences.put(e.getKey(), e.getValue());
            } 
            preferences.flush();
        } catch (BackingStoreException ex) {
            throw new IOException(ex);
        } 
    } 
}