jhplot.io
Class RecordsFile

java.lang.Object
  extended by jhplot.io.BaseRecordsFile
      extended by jhplot.io.RecordsFile

public class RecordsFile
extends BaseRecordsFile


Constructor Summary
RecordsFile(String dbPath, int initialSize)
          Creates a new database file.
RecordsFile(String dbPath, String accessFlags)
          Opens an existing database and initializes the in-memory index.
 
Method Summary
 void close()
          Closes the database.
 Enumeration enumerateKeys()
          Returns an enumeration of all the keys in the database.
 int getNumRecords()
          Returns the current number of records in the database.
 boolean recordExists(String key)
          Checks if there is a record belonging to the given key.
 
Methods inherited from class jhplot.io.BaseRecordsFile
deleteRecord, insertRecord, readRecord, updateRecord
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecordsFile

public RecordsFile(String dbPath,
                   int initialSize)
            throws IOException,
                   RecordsFileException
Creates a new database file. The initialSize parameter determines the amount of space which is allocated for the index. The index can grow dynamically, but the parameter is provide to increase efficiency.

Throws:
IOException
RecordsFileException

RecordsFile

public RecordsFile(String dbPath,
                   String accessFlags)
            throws IOException,
                   RecordsFileException
Opens an existing database and initializes the in-memory index.

Throws:
IOException
RecordsFileException
Method Detail

enumerateKeys

public Enumeration enumerateKeys()
Returns an enumeration of all the keys in the database.

Specified by:
enumerateKeys in class BaseRecordsFile

getNumRecords

public int getNumRecords()
Returns the current number of records in the database.

Specified by:
getNumRecords in class BaseRecordsFile

recordExists

public boolean recordExists(String key)
Checks if there is a record belonging to the given key.

Specified by:
recordExists in class BaseRecordsFile

close

public void close()
           throws IOException,
                  RecordsFileException
Closes the database.

Overrides:
close in class BaseRecordsFile
Throws:
IOException
RecordsFileException


jHepWork 3.1 ©