summaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@koziol.gov>2019-04-14 03:58:16 (GMT)
committerQuincey Koziol <koziol@koziol.gov>2019-04-14 03:58:16 (GMT)
commitd7e1464058515d07b838741f65a77977224814de (patch)
treec25d0985895862053d6b9d1eb1fce4fa94d471e3 /java/src
parent4918d443bb2f8406c3be9882a7945853c84760f6 (diff)
downloadhdf5-d7e1464058515d07b838741f65a77977224814de.zip
hdf5-d7e1464058515d07b838741f65a77977224814de.tar.gz
hdf5-d7e1464058515d07b838741f65a77977224814de.tar.bz2
Add C++, Java, and FORTRAN wrappers and tests for H5Fget_fileno
Diffstat (limited to 'java/src')
-rw-r--r--java/src/hdf/hdf5lib/H5.java13
-rw-r--r--java/src/jni/h5fImp.c20
-rw-r--r--java/src/jni/h5fImp.h9
3 files changed, 42 insertions, 0 deletions
diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java
index d107ad8..e874732 100644
--- a/java/src/hdf/hdf5lib/H5.java
+++ b/java/src/hdf/hdf5lib/H5.java
@@ -2968,6 +2968,19 @@ public class H5 implements java.io.Serializable {
public synchronized static native int H5Fget_intent(long file_id) throws HDF5LibraryException;
/**
+ * H5Fget_fileno retrieves the "file number" for an open file.
+ *
+ * @param file_id
+ * IN: File identifier for a currently-open HDF5 file
+ *
+ * @return the unique file number for the file.
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ **/
+ public synchronized static native long H5Fget_fileno(long file_id) throws HDF5LibraryException;
+
+ /**
* H5Fget_mdc_hit_rate queries the metadata cache of the target file to obtain its hit rate (cache hits / (cache
* hits + cache misses)) since the last time hit rate statistics were reset.
*
diff --git a/java/src/jni/h5fImp.c b/java/src/jni/h5fImp.c
index d145c6a..26c1d17 100644
--- a/java/src/jni/h5fImp.c
+++ b/java/src/jni/h5fImp.c
@@ -275,6 +275,26 @@ done:
/*
* Class: hdf_hdf5lib_H5
+ * Method: H5Fget_fileno
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL
+Java_hdf_hdf5lib_H5_H5Fget_1fileno
+ (JNIEnv *env, jclass cls, jlong file_id)
+{
+ unsigned long fileno = 0;
+
+ UNUSED(cls);
+
+ if (H5Fget_intent((hid_t)file_id, &fileno) < 0)
+ H5_LIBRARY_ERROR(ENVONLY);
+
+done:
+ return (jlong)fileno;
+} /* end Java_hdf_hdf5lib_H5_H5Fget_1intent */
+
+/*
+ * Class: hdf_hdf5lib_H5
* Method: H5Fclose
* Signature: (J)I
*/
diff --git a/java/src/jni/h5fImp.h b/java/src/jni/h5fImp.h
index 410a249..fc02c76 100644
--- a/java/src/jni/h5fImp.h
+++ b/java/src/jni/h5fImp.h
@@ -104,6 +104,15 @@ Java_hdf_hdf5lib_H5_H5Fget_1intent
/*
* Class: hdf_hdf5lib_H5
+ * Method: H5Fget_fileno
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL
+Java_hdf_hdf5lib_H5_H5Fget_1fileno
+ (JNIEnv*, jclass, jlong);
+
+/*
+ * Class: hdf_hdf5lib_H5
* Method: H5Fclose
* Signature: (J)I
*/