com.partnersoft.maps.file
Class IntegerIndexFile

java.lang.Object
  extended by com.partnersoft.maps.file.IntegerIndexFile

public class IntegerIndexFile
extends java.lang.Object

A file containing byte offsets for another file, accessible by the order of the keys (index) or the integer key itself (key).

Copyright 2009 Partner Software, Inc.

Version:
$Id$
Author:
Paul Reavis

Constructor Summary
IntegerIndexFile(VfsFile file)
           
 
Method Summary
 void close()
           
 VfsFile getFile()
           
 int indexForKey(int key)
           
 int keyForIndex(int index)
           
 long offsetForIndex(int index)
           
 long offsetForKey(int key)
           
 void open()
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegerIndexFile

public IntegerIndexFile(VfsFile file)
Method Detail

open

public void open()
          throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

getFile

public VfsFile getFile()

offsetForKey

public long offsetForKey(int key)
                  throws java.io.IOException
Throws:
java.io.IOException

indexForKey

public int indexForKey(int key)
                throws java.io.IOException
Throws:
java.io.IOException

offsetForIndex

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

keyForIndex

public int keyForIndex(int index)

size

public int size()