static void checkStatus(long s) throws DBException { NativeStatus status = new NativeStatus(s); try { if( !status.isOk() ) { throw new DBException(status.toString(), status.isNotFound()); } } finally { status.delete(); } }
static void checkStatus(long s) throws DBException { NativeStatus status = new NativeStatus(s); try { if( !status.isOk() ) { throw new DBException(status.toString(), status.isNotFound()); } } finally { status.delete(); } }
static void checkStatus(long s) throws DBException { NativeStatus status = new NativeStatus(s); try { if( !status.isOk() ) { throw new DBException(status.toString(), status.isNotFound()); } } finally { status.delete(); } }
private byte[] get(NativeReadOptions options, NativeSlice keySlice) throws DBException { assertAllocated(); NativeStdString result = new NativeStdString(); try { long s = DBJNI.Get(self, options, keySlice, result.pointer()); NativeStatus status = new NativeStatus(s); try { if(status.isOk()) { return result.toByteArray(); } if(status.isNotFound()) { return null; } throw new DBException(status.toString(), status.isNotFound()); } finally { status.delete(); } } finally { result.delete(); } }
private byte[] get(NativeReadOptions options, NativeSlice keySlice) throws DBException { assertAllocated(); NativeStdString result = new NativeStdString(); try { long s = DBJNI.Get(self, options, keySlice, result.pointer()); NativeStatus status = new NativeStatus(s); try { if(status.isOk()) { return result.toByteArray(); } if(status.isNotFound()) { return null; } throw new DBException(status.toString(), status.isNotFound()); } finally { status.delete(); } } finally { result.delete(); } }
private byte[] get(NativeReadOptions options, NativeSlice keySlice) throws DBException { assertAllocated(); NativeStdString result = new NativeStdString(); try { long s = DBJNI.Get(self, options, keySlice, result.pointer()); NativeStatus status = new NativeStatus(s); try { if(status.isOk()) { return result.toByteArray(); } if(status.isNotFound()) { return null; } throw new DBException(status.toString(), status.isNotFound()); } finally { status.delete(); } } finally { result.delete(); } }