summaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2019-06-11 16:04:23 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2019-06-11 16:04:23 (GMT)
commit2bd041f8787562928ba8a060843cdeeb386bebf0 (patch)
treeb0dd4bec3cae19df2862cae18d549390629fa63e /java/src
parent48b0ff7724331737140ffae194cb2e741f0b668d (diff)
downloadhdf5-2bd041f8787562928ba8a060843cdeeb386bebf0.zip
hdf5-2bd041f8787562928ba8a060843cdeeb386bebf0.tar.gz
hdf5-2bd041f8787562928ba8a060843cdeeb386bebf0.tar.bz2
Added H5Fdelete call and VOL support (but no VFD/native implementation).
Diffstat (limited to 'java/src')
-rw-r--r--java/src/hdf/hdf5lib/HDF5Constants.java3
-rw-r--r--java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java5
-rw-r--r--java/src/jni/h5Constants.c2
3 files changed, 9 insertions, 1 deletions
diff --git a/java/src/hdf/hdf5lib/HDF5Constants.java b/java/src/hdf/hdf5lib/HDF5Constants.java
index 8054ee8..cb5ed22 100644
--- a/java/src/hdf/hdf5lib/HDF5Constants.java
+++ b/java/src/hdf/hdf5lib/HDF5Constants.java
@@ -121,6 +121,7 @@ public class HDF5Constants {
public static final long H5E_CANTDEC = H5E_CANTDEC();
public static final long H5E_CANTDECODE = H5E_CANTDECODE();
public static final long H5E_CANTDELETE = H5E_CANTDELETE();
+ public static final long H5E_CANTDELETEFILE = H5E_CANTDELETEFILE();
public static final long H5E_CANTENCODE = H5E_CANTENCODE();
public static final long H5E_CANTFLUSH = H5E_CANTFLUSH();
public static final long H5E_CANTFREE = H5E_CANTFREE();
@@ -863,6 +864,8 @@ public class HDF5Constants {
private static native final long H5E_CANTDELETE();
+ private static native final long H5E_CANTDELETEFILE();
+
private static native final long H5E_CANTENCODE();
private static native final long H5E_CANTFLUSH();
diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java b/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java
index 3a1361a..54acbdd 100644
--- a/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java
+++ b/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java
@@ -171,6 +171,9 @@ public class HDF5LibraryException extends HDF5Exception {
else if (err_code == HDF5Constants.H5E_MOUNT) {
return "file mount error";
}
+ else if (err_code == HDF5Constants.H5E_CANTDELETEFILE) {
+ return "Unable to delete file";
+ }
else if (err_code == HDF5Constants.H5E_SEEKERROR) {
return "seek failed";
}
@@ -262,7 +265,7 @@ public class HDF5LibraryException extends HDF5Exception {
return "unrecognized message";
}
else if (err_code == HDF5Constants.H5E_CANTDELETE) {
- return " Can't delete message";
+ return "Can't delete message";
}
else if (err_code == HDF5Constants.H5E_CANTOPENOBJ) {
return "Can't open object";
diff --git a/java/src/jni/h5Constants.c b/java/src/jni/h5Constants.c
index 4b10479..b9e320f 100644
--- a/java/src/jni/h5Constants.c
+++ b/java/src/jni/h5Constants.c
@@ -204,6 +204,8 @@ Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTDECODE(JNIEnv *env, jclass cls) { return
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTDELETE(JNIEnv *env, jclass cls) { return H5E_CANTDELETE; }
JNIEXPORT jlong JNICALL
+Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTDELETEFILE(JNIEnv *env, jclass cls) { return H5E_CANTDELETEFILE; }
+JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTENCODE(JNIEnv *env, jclass cls) { return H5E_CANTENCODE; }
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTFLUSH(JNIEnv *env, jclass cls) { return H5E_CANTFLUSH; }