org.oddjob.persist
Class SerializeWithFile
java.lang.Object
org.oddjob.persist.SerializeWithFile
public class SerializeWithFile
- extends Object
Serialize an object to and from file with the given name. The .ser extension
is added to the file name.
When writing a temporary name is used in case the process is kill mid writing
so there is less chance of a corrupted file. The temporary name includes an
underscore in the name.
- Author:
- Rob Gordon.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SerializeWithFile
public SerializeWithFile()
toFile
public void toFile(File dir,
String name,
Object o)
throws ComponentPersistException
- Throws:
ComponentPersistException
remove
public void remove(File dir,
String name)
fromFile
public Object fromFile(File dir,
String name,
ClassLoader classLoader)
throws ComponentPersistException
- Throws:
ComponentPersistException
clear
public void clear(File dir)
list
public String[] list(File dir)
children
public String[] children(File dir)