aQute.lib.index
Class Index

java.lang.Object
  extended by aQute.lib.index.Index
All Implemented Interfaces:
Iterable<byte[]>

public class Index
extends Object
implements Iterable<byte[]>

   0   ->   0, 122   -> 1
   123 -> 123, 244   -> 2
   245 -> 245, ...
 


Field Summary
 aQute.lib.index.Index.Page root
           
 
Constructor Summary
Index(File file, int keySize)
           
 
Method Summary
 void close()
           
 void insert(byte[] k, long v)
           
 Iterator<byte[]> iterator()
           
 long search(byte[] k)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

root

public aQute.lib.index.Index.Page root
Constructor Detail

Index

public Index(File file,
             int keySize)
      throws IOException
Throws:
IOException
Method Detail

insert

public void insert(byte[] k,
                   long v)
            throws Exception
Throws:
Exception

search

public long search(byte[] k)
            throws Exception
Throws:
Exception

toString

public String toString()
Overrides:
toString in class Object

close

public void close()
           throws IOException
Throws:
IOException

iterator

public Iterator<byte[]> iterator()
Specified by:
iterator in interface Iterable<byte[]>


Copyright © 2012 aQute SARL. All Rights Reserved.