Class NIODataStoreFactory

java.lang.Object
org.biojava.bio.program.ssaha.NIODataStoreFactory
All Implemented Interfaces:
DataStoreFactory

public class NIODataStoreFactory extends Object implements DataStoreFactory

Builder for a datastore that has no practical file size limit.

This implementation of the data store factory uses longs as indecies internaly, so can be used with files exceeding 2 gigs in size.

The data store file has the following structure.

 file: header, hash table, nameTable, hitTable

 header:
   long hashTablePos, // byte offset in file
   long hitTablePos,  // byte offset in file
   long nameTablePos, // byte offset in file
   int wordLength,
   int serializedPackingLength,
   byte[] serializedPacking

 hashTable:
   long hashTableLength,
   long[hashTableLength] hits // byte offset into hitTable

 nameTable:
   int nameTableSize, // size in bytes
   (short nameLength, char[nameLength] name)[nameTableSize] names

 hitTable:
   long hitTableSize, // size in bytes
   hitTableRecord[hitTableSize] hits

 hitTableRecord:
   int hitCount,
   hitRecord[hitCount] hit

 hit:
   long seqOffset, // byte offset into sequence names table
   int pos         // biological position in sequence
 

Author:
Matthew Pocock