|
Lvg Java 2006p Version |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.nih.nlm.nls.lvg.Trie.PersistentList
public class PersistentList
This class provides a mechanism for persistent linked list. One persistent file is capable of storing multiple linked lists. However, the store procedure (adding nodes) need to be done at one time consequencially for one linked list.
The file format is:
header + node1 + node2 + ...
where header is:
History:
| Field Summary | |
|---|---|
static int |
HEADER_OFFSET
the size of header used in binary file |
| Constructor Summary | |
|---|---|
PersistentList(java.lang.String path)
Create an object of persistent list, using a string for the path of the binary file to be strored. |
|
| Method Summary | |
|---|---|
void |
Add(PersistentListNode node)
Add a persistent node to the current persistent list. |
void |
Close()
Close the random access file of current persistent list. |
long |
GetAddress()
Get the beginning address of current persistent list. |
java.io.RandomAccessFile |
GetRaf()
Get the random access file of the current persistent list. |
static void |
main(java.lang.String[] args)
A test driver for this class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int HEADER_OFFSET
| Constructor Detail |
|---|
public PersistentList(java.lang.String path)
| Method Detail |
|---|
public void Add(PersistentListNode node)
throws java.io.IOException
node - the persistent node to be added
java.io.IOException - if probelms happens when accessing random access
filepublic long GetAddress()
public java.io.RandomAccessFile GetRaf()
public void Close()
throws java.io.IOException
java.io.IOException - if probelms happens when closing random access
filepublic static void main(java.lang.String[] args)
|
Lvg Java 2006p Version |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||