|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.rutil.file.SerializableObjectsFile<T>
public class SerializableObjectsFile<T extends java.io.Serializable>
A file IO implementation that allows read/write of multiple objects to a single
file. It relies on SerializableObjectHandler for serliazation/de-serliazation.
Data is stored in binray format and saved in the file in this format:
SerializableObjectHandler
Constructor Summary
SerializableObjectsFile(java.lang.String fileName)
Method Summary
LongArrayListbuildPositionArrayList()
voidclear()
voidclose()
voidcompact()
protected java.io.RandomAccessFilegetReadOnlyFile()
SerializableObjectHandler<T>getValueHandler()
booleanisValid(long position)
Tread(long position)
voidremoveAt(long position)
voidsetValueHandler(SerializableObjectHandler<T> serializableHandler)
longwrite(T value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SerializableObjectsFile
public SerializableObjectsFile(java.lang.String fileName)
Method Detail
buildPositionArrayList
public LongArrayList buildPositionArrayList()
getValueHandler
public SerializableObjectHandler<T> getValueHandler()
setValueHandler
public void setValueHandler(SerializableObjectHandler<T> serializableHandler)
write
public long write(T value)
read
public T read(long position)
isValid
public boolean isValid(long position)
removeAt
public void removeAt(long position)
clear
public void clear()
compact
public void compact()
close
public void close()
getReadOnlyFile
protected java.io.RandomAccessFile getReadOnlyFile()
Overview
Package
Class
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD