diff options
author | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2019-04-24 17:57:30 (GMT) |
---|---|---|
committer | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2019-04-24 17:57:30 (GMT) |
commit | 7dd53873f73ee67046607b50067b543f2a44cab3 (patch) | |
tree | 4d08558545b8403ed43ff27ebb5bd02b8503a52e /java/src | |
parent | 6682f51a1157dc9e88bd34528fff999aee50ca2a (diff) | |
parent | 4fbe80acc27bc0e84eec9880c3c4257802e5bae5 (diff) | |
download | hdf5-7dd53873f73ee67046607b50067b543f2a44cab3.zip hdf5-7dd53873f73ee67046607b50067b543f2a44cab3.tar.gz hdf5-7dd53873f73ee67046607b50067b543f2a44cab3.tar.bz2 |
Merge branch 'develop' into H10621
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/hdf/hdf5lib/H5.java | 17 | ||||
-rw-r--r-- | java/src/hdf/hdf5lib/HDF5Constants.java | 3 | ||||
-rw-r--r-- | java/src/jni/h5Constants.c | 2 | ||||
-rw-r--r-- | java/src/jni/h5fImp.c | 24 | ||||
-rw-r--r-- | java/src/jni/h5fImp.h | 9 | ||||
-rw-r--r-- | java/src/jni/h5sImp.c | 4 |
6 files changed, 53 insertions, 6 deletions
diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 57157c2..e874732 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -212,7 +212,7 @@ import hdf.hdf5lib.structs.H5O_info_t; * exception handlers to print out the HDF-5 error stack. * <hr> * - * @version HDF5 1.11.4 <BR> + * @version HDF5 1.11.5 <BR> * <b>See also: <a href ="./hdf.hdf5lib.HDFArray.html"> hdf.hdf5lib.HDFArray</a> </b><BR> * <a href ="./hdf.hdf5lib.HDF5Constants.html"> hdf.hdf5lib.HDF5Constants</a><BR> * <a href ="./hdf.hdf5lib.HDF5CDataTypes.html"> hdf.hdf5lib.HDF5CDataTypes</a><BR> @@ -235,7 +235,7 @@ public class H5 implements java.io.Serializable { * * Make sure to update the versions number when a different library is used. */ - public final static int LIB_VERSION[] = { 1, 11, 4 }; + public final static int LIB_VERSION[] = { 1, 11, 5 }; public final static String H5PATH_PROPERTY_KEY = "hdf.hdf5lib.H5.hdf5lib"; @@ -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/hdf/hdf5lib/HDF5Constants.java b/java/src/hdf/hdf5lib/HDF5Constants.java index a0c2ed6..9294bad 100644 --- a/java/src/hdf/hdf5lib/HDF5Constants.java +++ b/java/src/hdf/hdf5lib/HDF5Constants.java @@ -216,6 +216,7 @@ public class HDF5Constants { public static final int H5F_LIBVER_EARLIEST = H5F_LIBVER_EARLIEST(); public static final int H5F_LIBVER_V18 = H5F_LIBVER_V18(); public static final int H5F_LIBVER_V110 = H5F_LIBVER_V110(); + public static final int H5F_LIBVER_V112 = H5F_LIBVER_V112(); public static final int H5F_LIBVER_NBOUNDS = H5F_LIBVER_NBOUNDS(); public static final int H5F_LIBVER_LATEST = H5F_LIBVER_LATEST(); public static final int H5F_OBJ_ALL = H5F_OBJ_ALL(); @@ -1049,6 +1050,8 @@ public class HDF5Constants { private static native final int H5F_LIBVER_V110(); + private static native final int H5F_LIBVER_V112(); + private static native final int H5F_LIBVER_NBOUNDS(); private static native final int H5F_LIBVER_LATEST(); diff --git a/java/src/jni/h5Constants.c b/java/src/jni/h5Constants.c index 2ac0892..74eb436 100644 --- a/java/src/jni/h5Constants.c +++ b/java/src/jni/h5Constants.c @@ -401,6 +401,8 @@ Java_hdf_hdf5lib_HDF5Constants_H5F_1LIBVER_1V18(JNIEnv *env, jclass cls){return JNIEXPORT jint JNICALL Java_hdf_hdf5lib_HDF5Constants_H5F_1LIBVER_1V110(JNIEnv *env, jclass cls){return H5F_LIBVER_V110;} JNIEXPORT jint JNICALL +Java_hdf_hdf5lib_HDF5Constants_H5F_1LIBVER_1V112(JNIEnv *env, jclass cls){return H5F_LIBVER_V112;} +JNIEXPORT jint JNICALL Java_hdf_hdf5lib_HDF5Constants_H5F_1LIBVER_1NBOUNDS(JNIEnv *env, jclass cls){return H5F_LIBVER_NBOUNDS;} JNIEXPORT jint JNICALL Java_hdf_hdf5lib_HDF5Constants_H5F_1LIBVER_1LATEST(JNIEnv *env, jclass cls){return H5F_LIBVER_LATEST;} diff --git a/java/src/jni/h5fImp.c b/java/src/jni/h5fImp.c index d145c6a..80567d9 100644 --- a/java/src/jni/h5fImp.c +++ b/java/src/jni/h5fImp.c @@ -260,11 +260,11 @@ done: */ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Fget_1intent - (JNIEnv *env, jclass cls, jlong file_id) + (JNIEnv *env, jclass clss, jlong file_id) { unsigned intent = 0; - UNUSED(cls); + UNUSED(clss); if (H5Fget_intent((hid_t)file_id, &intent) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -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 clss, jlong file_id) +{ + unsigned long fileno = 0; + + UNUSED(clss); + + if (H5Fget_fileno((hid_t)file_id, &fileno) < 0) + H5_LIBRARY_ERROR(ENVONLY); + +done: + return (jlong)fileno; +} /* end Java_hdf_hdf5lib_H5_H5Fget_1fileno */ + +/* + * 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 */ diff --git a/java/src/jni/h5sImp.c b/java/src/jni/h5sImp.c index a91dab2..d8110a1 100644 --- a/java/src/jni/h5sImp.c +++ b/java/src/jni/h5sImp.c @@ -1141,7 +1141,7 @@ Java_hdf_hdf5lib_H5_H5Sencode if (obj_id < 0) H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Sencode: invalid object ID"); - if ((status = H5Sencode(obj_id, NULL, &buf_size)) < 0) + if ((status = H5Sencode2(obj_id, NULL, &buf_size, H5P_DEFAULT)) < 0) H5_LIBRARY_ERROR(ENVONLY); if (buf_size == 0) @@ -1150,7 +1150,7 @@ Java_hdf_hdf5lib_H5_H5Sencode if (NULL == (bufPtr = (unsigned char *) HDcalloc((size_t) 1, buf_size))) H5_JNI_FATAL_ERROR(ENVONLY, "H5Sencode: failed to allocate encoding buffer"); - if ((status = H5Sencode((hid_t) obj_id, bufPtr, &buf_size)) < 0) + if ((status = H5Sencode2((hid_t) obj_id, bufPtr, &buf_size, H5P_DEFAULT)) < 0) H5_LIBRARY_ERROR(ENVONLY); if (NULL == (returnedArray = ENVPTR->NewByteArray(ENVONLY, (jsize) buf_size))) |