final URI uri = URI.create(dbLocation + DB_NAME);
// Open or create a plain text database. This will create the
// directory and file defined by the URI (if they do not already
// exist).
Database db = DatabaseFactory.openOrCreate(uri);
// Close the database in case it is blank and we need to write to
// the file
db.close();
// Open a connection to the database file
final FileConnection fileConnection =
(FileConnection) Connector.open("file://" + dbLocation
+ DB_NAME);