|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.strangegizmo.cdb.Cdb
public class Cdb
Cdb implements a Java interface to D. J. Bernstein's CDB database.
Constructor Summary | |
---|---|
Cdb(java.lang.String filepath)
Creates an instance of the Cdb class and loads the given CDB file. |
Method Summary | |
---|---|
void |
close()
Closes the CDB database. |
static java.util.Enumeration |
elements(java.lang.String filepath)
Returns an Enumeration containing a CdbElement for each entry in the constant database. |
byte[] |
find(byte[] key)
Finds the first record stored under the given key. |
byte[] |
findnext(byte[] key)
Finds the next record stored under the given key. |
void |
findstart(byte[] key)
Prepares the class to search for the given key. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Cdb(java.lang.String filepath) throws java.io.IOException
filepath
- The path to the CDB file to open.
java.io.IOException
- if the CDB file could not be
opened.Method Detail |
---|
public final void close()
public final void findstart(byte[] key)
key
- The key to search for.public final byte[] find(byte[] key)
key
- The key to search for.
null
if no record with that key could be found.public final byte[] findnext(byte[] key)
key
- The key to search for.
null
if no record with that key could be found.public static java.util.Enumeration elements(java.lang.String filepath) throws java.io.IOException
filepath
- The CDB file to read.
java.io.IOException
- if an error occurs reading the
constant database.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |