bb.util
Class PreferencesUtil

java.lang.Object
  extended by bb.util.PreferencesUtil

public final class PreferencesUtil
extends Object

Provides static utility methods for dealing with Preferences.

This class is multithread safe: it is stateless.

Author:
Brent Boyer

Constructor Summary
private PreferencesUtil()
          This private constructor suppresses the default (public) constructor, ensuring non-instantiability.
 
Method Summary
static void main(String[] args)
          Executes resetPreferences.
static void resetPreferences()
          Removes all Preferences nodes except for the system and user root nodes.
private static void resetPreferences(Preferences root)
          Since cannot remove a root node, this method instead removes all of root's children.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreferencesUtil

private PreferencesUtil()
This private constructor suppresses the default (public) constructor, ensuring non-instantiability.

Method Detail

main

public static void main(String[] args)
Executes resetPreferences.


resetPreferences

public static void resetPreferences()
                             throws Exception
Removes all Preferences nodes except for the system and user root nodes. If the Preferences implementation supports stored defaults, this method will expose them.

Throws:
Exception

resetPreferences

private static void resetPreferences(Preferences root)
                              throws Exception
Since cannot remove a root node, this method instead removes all of root's children.

Throws:
Exception