JTP API Documentation

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

Nested Class Summary
 
Nested classes inherited from class jtp.util.ObjectStorage
ObjectStorage.Handle
 
Field Summary
protected  File file
           
protected  InputStream in
           
protected  OutputStream out
           
protected  RandomAccessFile raf
           
 
Constructor Summary
FileObjectStorage(File f)
           
FileObjectStorage(File f, boolean readOnly)
           
 
Method Summary
 File getFile()
           
 boolean isReadOnly()
           
 Object retrieveObjectAt(long location)
           
 void setFile(File f)
           
 long storeObject(Object o)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

file

protected File file

raf

protected transient RandomAccessFile raf

in

protected transient InputStream in

out

protected transient OutputStream out
Constructor Detail

FileObjectStorage

public FileObjectStorage(File f)
                  throws IOException

FileObjectStorage

public FileObjectStorage(File f,
                         boolean readOnly)
                  throws IOException
Method Detail

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

JTP API Documentation