visidia.misc
Class PrefObj
java.lang.Object
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).
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 |
PrefObj
public PrefObj()
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