|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.strangegizmo.cdb.CdbMake
CdbMake implements the database-creation side of D. J. Bernstein's constant database package.
Constructor Summary | |
CdbMake()
Constructs a CdbMake object and prepares it for the creation of a constant database. |
Method Summary | |
void |
add(byte[] key,
byte[] data)
Adds a key to the constant database. |
void |
finish()
Finalizes the constant database. |
static void |
make(java.io.InputStream in,
java.lang.String cdbFilepath,
java.lang.String tempFilepath)
Builds a CDB file from a CDB-format InputStream. |
static void |
make(java.io.InputStream in,
java.lang.String cdbFilepath,
java.lang.String tempFilepath,
Cdb ignoreCdb)
Builds a CDB file from a CDB-format InputStream, excluding records with data matching keys in `ignoreCdb'. |
static void |
make(java.lang.String dataFilepath,
java.lang.String cdbFilepath,
java.lang.String tempFilepath)
Builds a CDB file from a CDB-format text file. |
static void |
make(java.lang.String dataFilepath,
java.lang.String cdbFilepath,
java.lang.String tempFilepath,
Cdb ignoreCdb)
Builds a CDB file from a CDB-format text file, excluding records with data matching keys in `ignoreCdb'. |
void |
start(java.lang.String filepath)
Begins the constant database creation process. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CdbMake()
Method Detail |
public void start(java.lang.String filepath) throws java.io.IOException
filepath
- The path to the constant database to create.java.io.IOException
- If an error occurs creating the
constant database file.public void add(byte[] key, byte[] data) throws java.io.IOException
key
- The key to add to the database.data
- The data associated with this key.java.io.IOException
- If an error occurs adding the key
to the database.public void finish() throws java.io.IOException
java.io.IOException
- If an error occurs closing out the
database.public static void make(java.lang.String dataFilepath, java.lang.String cdbFilepath, java.lang.String tempFilepath) throws java.io.IOException
dataFilepath
- The CDB data file to read.cdbFilepath
- The CDB file to create.tempFilepath
- The temporary file to use when creating the
CDB file.java.io.IOException
- if an error occurs rebuilding the
CDB file.public static void make(java.lang.String dataFilepath, java.lang.String cdbFilepath, java.lang.String tempFilepath, Cdb ignoreCdb) throws java.io.IOException
dataFilepath
- The CDB data file to read.cdbFilepath
- The CDB file to create.tempFilepath
- The temporary file to use when creating the
CDB file.ignoreCdb
- If the data for an entry matches a key in this
CDB file, the entry will not be added to the new file.java.io.IOException
- if an error occurs rebuilding the
CDB file.public static void make(java.io.InputStream in, java.lang.String cdbFilepath, java.lang.String tempFilepath) throws java.io.IOException
in
- The InputStream to read.cdbFilepath
- The CDB file to create.tempFilepath
- The temporary file to use when creating the
CDB file.java.io.IOException
- if an error occurs rebuilding the
CDB file.public static void make(java.io.InputStream in, java.lang.String cdbFilepath, java.lang.String tempFilepath, Cdb ignoreCdb) throws java.io.IOException
in
- The InputStream to read.cdbFilepath
- The CDB file to create.tempFilepath
- The temporary file to use when creating the
CDB file.ignoreCdb
- If the data for an entry matches a key in this
CDB file, the entry will not be added to the new file.java.io.IOException
- if an error occurs rebuilding the
CDB file.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |