Exemplo n.º 1
0
 public static NativeDB open(NativeOptions options, File path) throws IOException, DBException {
   checkArgNotNull(options, "options");
   checkArgNotNull(path, "path");
   long rc[] = new long[1];
   try {
     checkStatus(DBJNI.Open(options, path.getCanonicalPath(), rc));
   } catch (IOException e) {
     if (rc[0] != 0) {
       DBJNI.delete(rc[0]);
     }
     throw e;
   }
   return new NativeDB(rc[0]);
 }
Exemplo n.º 2
0
 public void delete() {
   assertAllocated();
   DBJNI.delete(self);
   self = 0;
 }