jtp.util
Class FileObjectStorage
java.lang.Object
|
+--jtp.util.FileObjectStorage
- All Implemented Interfaces:
- ObjectStorage, Serializable
- public class FileObjectStorage
- extends Object
- implements ObjectStorage, Serializable
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
file
protected File file
raf
protected transient RandomAccessFile raf
in
protected transient InputStream in
out
protected transient OutputStream out
FileObjectStorage
public FileObjectStorage(File f)
throws IOException
FileObjectStorage
public FileObjectStorage(File f,
boolean readOnly)
throws IOException
storeObject
public long storeObject(Object o)
throws IOException
- Specified by:
storeObject
in interface ObjectStorage
IOException
isReadOnly
public boolean isReadOnly()
- Specified by:
isReadOnly
in interface ObjectStorage
getFile
public File getFile()
setFile
public void setFile(File f)
retrieveObjectAt
public Object retrieveObjectAt(long location)
throws IOException
- Specified by:
retrieveObjectAt
in interface ObjectStorage
IOException