public abstract class PackedNamedRandomAccessObjectDump
extends java.lang.Object
Compressed by default; optional constructor for uncompressed mode.
| Constructor and Description |
|---|
PackedNamedRandomAccessObjectDump(java.io.File filet)
Creates a PackedNamedRandomAccessObjectDump file for the given filename.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
finalize() |
int |
findClosest(java.lang.String key)
Returns the index of the "closest" record matching the given key (this
would be the insertion point if you were to insert the given key) Uses
binary search, so the file has to be sorted first.
|
java.io.File |
getFile() |
int |
getSize() |
int |
indexOf(java.lang.String name) |
java.lang.String |
readName(int index) |
java.lang.Object |
readObject(int index) |
java.lang.Object |
readObject(java.lang.String name)
This requires that the file be sorted.
|
protected abstract java.lang.Object |
readObjectImp(java.lang.String name,
java.io.RandomAccessFile filet)
Override this to provide custom reading of your data.
|
public PackedNamedRandomAccessObjectDump(java.io.File filet)
throws java.io.IOException
java.io.IOExceptionpublic void close()
public void finalize()
finalize in class java.lang.Objectpublic int getSize()
public int indexOf(java.lang.String name)
public java.lang.Object readObject(java.lang.String name)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.Object readObject(int index)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String readName(int index)
throws java.io.IOException
java.io.IOExceptionpublic int findClosest(java.lang.String key)
public java.io.File getFile()
protected abstract java.lang.Object readObjectImp(java.lang.String name,
java.io.RandomAccessFile filet)
throws java.io.IOException
java.io.IOException