utils
Class PreferencesUtils

java.lang.Object
  extended by utils.PreferencesUtils

public class PreferencesUtils
extends java.lang.Object

Copyright DocJava, inc. User: lyon

Date: Apr 30, 2005

Time: 4:28:24 PM


Constructor Summary
PreferencesUtils(java.lang.String key)
           
 
Method Summary
static void main(java.lang.String[] args)
           
 java.lang.Object restore()
          restores the properties from the preference in the user root.
static java.lang.Object restore(java.io.File f)
           
 void save(java.io.Serializable obj)
          saves the properties to the Preferences of the userRoot
static void save(java.io.Serializable obj, java.io.File f)
          saves the properties to the Preferences of the userRoot
 java.lang.String toString(java.io.Serializable obj)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreferencesUtils

public PreferencesUtils(java.lang.String key)
Method Detail

save

public static void save(java.io.Serializable obj,
                        java.io.File f)
saves the properties to the Preferences of the userRoot

Parameters:
obj - a serializable object that is to be saved
f - file into which the save occurs

save

public void save(java.io.Serializable obj)
saves the properties to the Preferences of the userRoot


toString

public java.lang.String toString(java.io.Serializable obj)

restore

public java.lang.Object restore()
restores the properties from the preference in the user root.

Returns:
null unless key is found

restore

public static java.lang.Object restore(java.io.File f)

main

public static void main(java.lang.String[] args)