db = getFileDB();
DatabaseEntry theKey = new DatabaseEntry(key.getBytes("UTF-8"));
DatabaseEntry theData = new DatabaseEntry(data);
db.put(null, theKey, theData);
} catch (UnsupportedEncodingException e) {
throw new SystemException(e);
} catch (DatabaseException e) {
throw new SystemException(e);
} finally {
if (db != null) {
try {
db.close();
} catch (DatabaseException e) {
throw new SystemException(e);
}
}
}
}