Package java.util.prefs

Examples of java.util.prefs.Preferences.sync()


        Preferences prefs = Preferences.userNodeForPackage(BeforeAfterParent.class);
        int numMessages = prefs.getInt("numMessages", 0);
        prefs.put("message." + numMessages, message);
        prefs.putInt("numMessages", ++numMessages);
        try {
            prefs.sync();
        }
        catch (BackingStoreException exc) {
            throw new TestContainerException(exc);
        }
    }
View Full Code Here


                for (Option option : Option.values()) {
                    prefs.put(getPreferencesName(option, i), getValue(option));
                }

                try {
                    prefs.sync();
                } catch (BackingStoreException ex) {
                }
            }

            return super.build();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.