com.partnersoft.v3x.io.formats
Class PackedNamedObjectDump

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

public class PackedNamedObjectDump
extends java.lang.Object

This is a packed (single file) version of a NamedObjectDump. Read-only; you must first create and sort a NamedObjectDump 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
PackedNamedObjectDump(java.io.File filet)
          Creates a PackedNamedObjectDump file for the given filename.
 
Method Summary
 HashedCache getCache()
           
 int getSize()
           
 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.
 java.lang.Object readObjectUncached(java.lang.String name)
          What it sez.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PackedNamedObjectDump

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

Throws:
java.io.IOException
Method Detail

getCache

public HashedCache getCache()

getSize

public int getSize()

readObject

public java.lang.Object readObject(java.lang.String name)
                            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(java.lang.String name)
                                    throws java.io.IOException
What it sez.

Throws:
java.io.IOException

readObject

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

readName

public java.lang.String readName(int index)
                          throws java.io.IOException
Throws:
java.io.IOException