com.partnersoft.v3x.io.formats
Class PackedGoedelObjectDump

java.lang.Object
  extended by com.partnersoft.v3x.io.formats.PackedGoedelObjectDump

public class PackedGoedelObjectDump
extends java.lang.Object

This is a packed (single file) version of a GoedelObjectDump. Read-only; you must first create and sort a GoedelObjectDump then run the pack() method on it. Not threadsafe. Write a wrapper if you need thread safety.

Compressed by default; optional constructor for uncompressed mode.


Constructor Summary
PackedGoedelObjectDump(java.io.File filet)
          Creates a PackedGoedelObjectDump file for the given filename.
 
Method Summary
 java.lang.Object findNearest(long ID)
          What it sez.
 long findNearestID(long ID)
          What it sez.
 HashedCache getCache()
           
 ArraySearchingGopher getSearchingGopher()
           
 int getSize()
           
static void main(java.lang.String[] argv)
          Prints every record in the dumpfile.
 long readID(int index)
           
 java.lang.Object readObject(int index)
           
 java.lang.Object readObject(long ID)
          This requires that the file be sorted.
 java.lang.Object readObjectUncached(long ID)
          What it sez.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PackedGoedelObjectDump

public PackedGoedelObjectDump(java.io.File filet)
                       throws java.io.IOException
Creates a PackedGoedelObjectDump file for the given filename.

Throws:
java.io.IOException
Method Detail

main

public static void main(java.lang.String[] argv)
Prints every record in the dumpfile.


getCache

public HashedCache getCache()

getSize

public int getSize()

readObject

public java.lang.Object readObject(long ID)
                            throws java.io.IOException
This requires that the file be sorted. Returns null on fail.

Throws:
java.io.IOException

readObjectUncached

public java.lang.Object readObjectUncached(long ID)
                                    throws java.io.IOException
What it sez.

Throws:
java.io.IOException

findNearestID

public long findNearestID(long ID)
                   throws java.io.IOException
What it sez.

Throws:
java.io.IOException

findNearest

public java.lang.Object findNearest(long ID)
                             throws java.io.IOException
What it sez.

Throws:
java.io.IOException

getSearchingGopher

public ArraySearchingGopher getSearchingGopher()

readObject

public java.lang.Object readObject(int index)
                            throws java.io.IOException
Throws:
java.io.IOException

readID

public long readID(int index)
            throws java.io.IOException
Throws:
java.io.IOException