summaryrefslogtreecommitdiffstats
path: root/java/src/jni/h5fImp.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-12-17 17:16:59 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-12-17 17:16:59 (GMT)
commit8dbadb41a3b23d6d74effee7bef0302fd81b80a6 (patch)
treec15301ff6866509cc6a08a4b52f8599c95d96bf0 /java/src/jni/h5fImp.c
parent1e9efded02415d56bc4cccc5119001fedfb7168f (diff)
downloadhdf5-8dbadb41a3b23d6d74effee7bef0302fd81b80a6.zip
hdf5-8dbadb41a3b23d6d74effee7bef0302fd81b80a6.tar.gz
hdf5-8dbadb41a3b23d6d74effee7bef0302fd81b80a6.tar.bz2
HDFFV-10663 add new function H5Fis_accessible
Diffstat (limited to 'java/src/jni/h5fImp.c')
-rw-r--r--java/src/jni/h5fImp.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/java/src/jni/h5fImp.c b/java/src/jni/h5fImp.c
index 9d68290..248e654 100644
--- a/java/src/jni/h5fImp.c
+++ b/java/src/jni/h5fImp.c
@@ -168,6 +168,33 @@ Java_hdf_hdf5lib_H5_H5Fis_1hdf5
/*
* Class: hdf_hdf5lib_H5
+ * Method: H5Fis_accessible
+ * Signature: (Ljava/lang/String;J)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_hdf_hdf5lib_H5_H5Fis_1accessible
+ (JNIEnv *env, jclass clss, jstring name, jlong file_id)
+{
+ htri_t bval = JNI_FALSE;
+ const char *fileName;
+
+ PIN_JAVA_STRING(name, fileName);
+ if (fileName != NULL) {
+ bval = H5Fis_accessible(fileName, (hid_t)file_id);
+
+ UNPIN_JAVA_STRING(name, fileName);
+
+ if (bval > 0)
+ bval = JNI_TRUE;
+ else if (bval < 0)
+ h5libraryError(env);
+ }
+
+ return (jboolean)bval;
+} /* end Java_hdf_hdf5lib_H5_H5Fis_1accessible */
+
+/*
+ * Class: hdf_hdf5lib_H5
* Method: H5Fget_create_plist
* Signature: (J)J
*/
@@ -177,7 +204,7 @@ Java_hdf_hdf5lib_H5__1H5Fget_1create_1plist
{
hid_t retVal = -1;
- retVal = H5Fget_create_plist((hid_t)file_id );
+ retVal = H5Fget_create_plist((hid_t)file_id);
if (retVal < 0)
h5libraryError(env);