diff options
Diffstat (limited to 'java/src/jni')
-rw-r--r-- | java/src/jni/h5pImp.c | 34 | ||||
-rw-r--r-- | java/src/jni/h5pImp.h | 19 |
2 files changed, 53 insertions, 0 deletions
diff --git a/java/src/jni/h5pImp.c b/java/src/jni/h5pImp.c index 7c71da1..01da210 100644 --- a/java/src/jni/h5pImp.c +++ b/java/src/jni/h5pImp.c @@ -5542,6 +5542,40 @@ Java_hdf_hdf5lib_H5_H5Piterate return (jint)status; } /* end Java_hdf_hdf5lib_H5_H5Piterate */ +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Pget_metadata_read_attempts + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL +Java_hdf_hdf5lib_H5_H5Pget_1metadata_1read_1attempts + (JNIEnv *env, jclass clss, jlong plist_id) +{ + unsigned attempts; + if (H5Pget_metadata_read_attempts((hid_t)plist_id, &attempts) < 0) + h5libraryError(env); + + return (jlong) attempts; +} /* end Java_hdf_hdf5lib_H5_H5Pget_1metadata_1read_1attempts */ + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Pset_metadata_read_attempts + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5Pset_1metadata_1read_1attempts + (JNIEnv *env, jclass clss, jlong plist_id, jlong attempts) +{ + if (attempts <= 0) { + h5badArgument(env, "H5Pset_metadata_read_attempts: attempts <= 0"); + } /* end if */ + else { + if(H5Pset_metadata_read_attempts((hid_t)plist_id, (unsigned)attempts) < 0) + h5libraryError(env); + } /* end else */ +} /* end Java_hdf_hdf5lib_H5_H5Pset_1metadata_1read_1attempts */ + #ifdef __cplusplus } /* end extern "C" */ #endif /* __cplusplus */ diff --git a/java/src/jni/h5pImp.h b/java/src/jni/h5pImp.h index 2269624..d606b7a 100644 --- a/java/src/jni/h5pImp.h +++ b/java/src/jni/h5pImp.h @@ -1473,6 +1473,25 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Piterate (JNIEnv*, jclass, jlong, jintArray, jobject, jobject); +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Pget_metadata_read_attempts + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL +Java_hdf_hdf5lib_H5_H5Pget_1metadata_1read_1attempts +(JNIEnv *, jclass, jlong); + + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Pset_metadata_read_attempts + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5Pset_1metadata_1read_1attempts +(JNIEnv *, jclass, jlong, jlong); + #ifdef __cplusplus } /* end extern "C" */ |