Package java.util.prefs

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


        assertFalse(pref.nodeExists("child"));
        Preferences grandchild = pref.node("child/grandchild");
        assertTrue(pref.nodeExists("child"));
        assertTrue(pref.nodeExists("child/grandchild"));
        grandchild.removeNode();
        assertTrue(pref.nodeExists("child"));
        assertFalse(pref.nodeExists("child/grandchild"));
        assertFalse(grandchild.nodeExists(""));

        assertFalse(pref.nodeExists("child2/grandchild"));
View Full Code Here


    prefs.remove(key12);
    prefs.remove(key13);
    prefs.remove(key2);
    prefs.remove(key3);
    try {
      prefs.removeNode();
    } catch (BackingStoreException e) {
      e.printStackTrace();
    }
   
    prefs = Preferences.userRoot().node("/jivalo");
View Full Code Here

      e.printStackTrace();
    }
   
    prefs = Preferences.userRoot().node("/jivalo");
    try {
      prefs.removeNode();
    } catch (BackingStoreException e) {
      e.printStackTrace();
    }
   
    System.out.println("Done.");
View Full Code Here

    prefs.remove(key12);
    prefs.remove(key13);
    prefs.remove(key2);
    prefs.remove(key3);
    try {
      prefs.removeNode();
    } catch (BackingStoreException e) {
      e.printStackTrace();
    }
   
    prefs = Preferences.userRoot().node("/jivalo");
View Full Code Here

      e.printStackTrace();
    }
   
    prefs = Preferences.userRoot().node("/jivalo");
    try {
      prefs.removeNode();
    } catch (BackingStoreException e) {
      e.printStackTrace();
    }
   
    System.out.println("Done.");
View Full Code Here

    try {
      MultiPreferencesFactory.setFactory(factory);
      String nodeName = "this/is/a/test/testPreferencesAddAndRemoveNode";
     
      Preferences pref = fillTree(isSystemRoot, nodeName);     
      pref.removeNode();
      pref.flush();
      pref.get("test", null);
    } finally {
      MultiPreferencesFactory.setFactory(savedFactory);
    }
View Full Code Here

            log.error(msg, se);

            // Remove the preferences node.
            try
            {
                preferences.removeNode();
            }
            catch (BackingStoreException bse)
            {
                bse.printStackTrace();
            }
View Full Code Here

            }
            // Remove preferences
            Preferences groupPref = Preferences.userRoot().node((String) groups[i]);
            try
            {
                groupPref.removeNode();
            }
            catch (BackingStoreException bse)
            {
                String msg = "Unable to remove group preferences: " + groups[i];
                log.error(msg, bse);
View Full Code Here

            log.error(msg, se);

            // Remove the preferences node.
            try
            {
                preferences.removeNode();
            }
            catch (BackingStoreException bse)
            {
                bse.printStackTrace();
            }
View Full Code Here

            }
            // Remove preferences
            Preferences rolePref = Preferences.userRoot().node((String) roles[i]);
            try
            {
                rolePref.removeNode();
            }
            catch (BackingStoreException bse)
            {
                String msg = "Unable to remove role preferences: " + roles[i];
                log.error(msg, bse);
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.