visidia.misc
Class PrefObj

java.lang.Object
  extended by visidia.misc.PrefObj

public class PrefObj
extends java.lang.Object

This class turns an Object into a byte array (and conversely). The Object can thus be stored using the Preferences API. By Greg Travis (http://www.ibm.com/developerworks/java/library/j-prefapi.html).


Constructor Summary
PrefObj()
           
 
Method Summary
static java.lang.Object getObject(java.util.prefs.Preferences prefs, java.lang.String key)
           
static void putObject(java.util.prefs.Preferences prefs, java.lang.String key, java.lang.Object o)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrefObj

public PrefObj()
Method Detail

putObject

public static void putObject(java.util.prefs.Preferences prefs,
                             java.lang.String key,
                             java.lang.Object o)
                      throws java.io.IOException,
                             java.util.prefs.BackingStoreException,
                             java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.util.prefs.BackingStoreException
java.lang.ClassNotFoundException

getObject

public static java.lang.Object getObject(java.util.prefs.Preferences prefs,
                                         java.lang.String key)
                                  throws java.io.IOException,
                                         java.util.prefs.BackingStoreException,
                                         java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.util.prefs.BackingStoreException
java.lang.ClassNotFoundException