Commit 20212c5f authored by brinn's avatar brinn
Browse files

Migrate JHDF5 to HDF5 1.10.

A big 'thank you' goes to Gerd Heber from the HDF Group for doing a lot of the porting work to 1.10.
parent eb715b2c
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class ncsa_hdf_hdf5lib_H5_H5S */
#ifndef _Included_ncsa_hdf_hdf5lib_H5_H5S
#define _Included_ncsa_hdf_hdf5lib_H5_H5S
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Sclose
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5__1H5Sclose
(JNIEnv *, jclass, jint);
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Scopy
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5__1H5Scopy
(JNIEnv *, jclass, jint);
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Screate
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5__1H5Screate
(JNIEnv *, jclass, jint);
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Screate_simple
* Signature: (I[J[J)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5__1H5Screate_1simple
(JNIEnv *, jclass, jint, jlongArray, jlongArray);
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Sdecode
* Signature: ([B)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Sdecode
(JNIEnv *env, jclass cls, jbyteArray buf);
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Sencode
* Signature: (I)[B
*/
JNIEXPORT jbyteArray JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Sencode
(JNIEnv *env, jclass cls, jint obj_id);
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Sextent_copy
* Signature: (II)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Sextent_1copy
(JNIEnv *, jclass, jint, jint);
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Sextent_equal
* Signature: (II)Z
*/
JNIEXPORT jboolean JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Sextent_1equal
(JNIEnv *, jclass, jint, jint);
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Sget_select_bounds
* Signature: (I[J[J)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Sget_1select_1bounds
(JNIEnv *, jclass, jint, jlongArray, jlongArray);
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Sget_select_elem_npoints
* Signature: (I)J
*/
JNIEXPORT jlong JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Sget_1select_1elem_1npoints
(JNIEnv *, jclass, jint);
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Sget_select_elem_pointlist
* Signature: (IJJ[J)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Sget_1select_1elem_1pointlist
(JNIEnv *, jclass, jint, jlong, jlong, jlongArray);
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Sget_select_hyper_blocklist
* Signature: (IJJ[J)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Sget_1select_1hyper_1blocklist
(JNIEnv *, jclass, jint, jlong, jlong, jlongArray);
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Sget_select_hyper_nblocks
* Signature: (I)J
*/
JNIEXPORT jlong JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Sget_1select_1hyper_1nblocks
(JNIEnv *, jclass, jint);
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Sget_select_npoints
* Signature: (I)J
*/
JNIEXPORT jlong JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Sget_1select_1npoints
(JNIEnv *, jclass, jint);
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Sget_select_type
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Sget_1select_1type
(JNIEnv *, jclass, jint);
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Sget_simple_extent_dims
* Signature: (I[J[J)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Sget_1simple_1extent_1dims
(JNIEnv *, jclass, jint, jlongArray, jlongArray);
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Sget_simple_extent_ndims
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Sget_1simple_1extent_1ndims
(JNIEnv *, jclass, jint);
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Sget_simple_extent_npoints
* Signature: (I)J
*/
JNIEXPORT jlong JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Sget_1simple_1extent_1npoints
(JNIEnv *, jclass, jint);
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Sget_simple_extent_type
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Sget_1simple_1extent_1type
(JNIEnv *, jclass, jint);
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Sis_simple
* Signature: (I)Z
*/
JNIEXPORT jboolean JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Sis_1simple
(JNIEnv *, jclass, jint);
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Soffset_simple
* Signature: (I[B)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Soffset_1simple
(JNIEnv *, jclass, jint, jbyteArray);
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Sselect_all
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Sselect_1all
(JNIEnv *, jclass, jint);
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Sselect_elements
* Signature: (III[B)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Sselect_1elements
(JNIEnv *, jclass, jint, jint, jint, jbyteArray);
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Sselect_hyperslab
* Signature: (II[J[J[J[J)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Sselect_1hyperslab
(JNIEnv *, jclass, jint, jint, jlongArray, jlongArray, jlongArray, jlongArray);
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Sselect_none
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Sselect_1none
(JNIEnv *, jclass, jint);
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Sselect_valid
* Signature: (I)Z
*/
JNIEXPORT jboolean JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Sselect_1valid
(JNIEnv *, jclass, jint);
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Sset_extent_none
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Sset_1extent_1none
(JNIEnv *, jclass, jint);
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Sset_extent_simple
* Signature: (II[J[J)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Sset_1extent_1simple
(JNIEnv *, jclass, jint, jint, jlongArray, jlongArray);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF Java Products. The full HDF Java copyright *
* notice, including terms governing use, modification, and redistribution, *
* is contained in the file, COPYING. COPYING can be found at the root of *
* the source code distribution tree. You can also access it online at *
* http://www.hdfgroup.org/products/licenses.html. If you do not have *
* access to the file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* This code is the C-interface called by Java programs to access the
* Group Object API Functions of the HDF5 library.
*
* Each routine wraps a single HDF entry point, generally with the
* analogous arguments and return codes.
*
* For details of the HDF libraries, see the HDF Documentation at:
* http://hdfdfgroup.org/HDF5/doc/
*
*/
#ifdef __cplusplus
extern "C" {
#endif
#include <jni.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "hdf5.h"
#include "h5jni.h"
#include "h5tImp.h"
//#include "h5util.h"
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: _H5Topen
* Signature: (ILjava/lang/String;)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5__1H5Topen
(JNIEnv *env, jclass clss, jint loc_id, jstring name)
{
hid_t status;
char* tname;
jboolean isCopy;
if (name == NULL) {
h5nullArgument( env, "H5Topen: name is NULL");
return -1;
}
tname = (char *)ENVPTR->GetStringUTFChars(ENVPAR name,&isCopy);
if (tname == NULL) {
h5JNIFatalError(env, "H5Topen: name not pinned");
return -1;
}
status = H5Topen2(loc_id, tname, (hid_t)H5P_DEFAULT);
ENVPTR->ReleaseStringUTFChars(ENVPAR name,tname);
if (status < 0) {
h5libraryError(env);
}
return (jint)status;
}
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Tcommit1
* Signature: (ILjava/lang/String;I)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Tcommit1
(JNIEnv *env, jclass clss, jint loc_id, jstring name, jint type)
{
herr_t status;
char* tname;
jboolean isCopy;
if (name == NULL) {
h5nullArgument( env, "H5Tcommit: name is NULL");
return -1;
}
tname = (char *)ENVPTR->GetStringUTFChars(ENVPAR name,&isCopy);
if (tname == NULL) {
h5JNIFatalError(env, "H5Tcommit: name not pinned");
return -1;
}
status = H5Tcommit2(loc_id, tname, type, (hid_t)H5P_DEFAULT, (hid_t)H5P_DEFAULT, (hid_t)H5P_DEFAULT);
ENVPTR->ReleaseStringUTFChars(ENVPAR name,tname);
if (status < 0) {
h5libraryError(env);
}
return (jint)status;
}
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Tcommitted
* Signature: (I)Z
*/
JNIEXPORT jboolean JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Tcommitted
(JNIEnv *env, jclass clss, jint type)
{
htri_t bval;
bval = H5Tcommitted(type);
if (bval > 0) {
return JNI_TRUE;
}
else if (bval == 0) {
return JNI_FALSE;
}
else {
/* raise exception -- return value is irrelevant */
h5libraryError(env);
return JNI_FALSE;
}
}
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Tcreate
* Signature: (IJ)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5__1H5Tcreate
(JNIEnv *env, jclass clss, jint dclass, jlong size)
{
hid_t retVal = -1;
retVal = H5Tcreate((H5T_class_t )dclass, (size_t)size );
if (retVal < 0) {
h5libraryError(env);
}
return (jint)retVal;
}
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Tcopy
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5__1H5Tcopy
(JNIEnv *env, jclass clss, jint type_id)
{
hid_t retVal = -1;
retVal = H5Tcopy(type_id);
if (retVal < 0) {
h5libraryError(env);
}
return (jint)retVal;
}
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Tequal
* Signature: (II)Z
*/
JNIEXPORT jboolean JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Tequal
(JNIEnv *env, jclass clss, jint type_id1, jint type_id2)
{
htri_t bval;
bval = H5Tequal(type_id1, type_id2 );
if (bval > 0) {
return JNI_TRUE;
}
else if (bval == 0) {
return JNI_FALSE;
}
else {
/* raise exception -- return value is irrelevant */
h5libraryError(env);
return JNI_FALSE;
}
}
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Tlock
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Tlock
(JNIEnv *env, jclass clss, jint type_id)
{
herr_t retVal = -1;
retVal = H5Tlock(type_id );
if (retVal < 0) {
h5libraryError(env);
}
return (jint)retVal;
}
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Tget_class
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Tget_1class
(JNIEnv *env, jclass clss, jint type_id)
{
H5T_class_t retVal = H5T_NO_CLASS;
retVal = H5Tget_class(type_id );
if (retVal == H5T_NO_CLASS) {
h5libraryError(env);
}
return (jint)retVal;
}
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Tget_size
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Tget_1size
(JNIEnv *env, jclass clss, jint type_id)
{
size_t retVal = 0;
retVal = H5Tget_size(type_id );
if (retVal == 0) {
h5libraryError(env);
}
return (jint)retVal;
}
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Tget_size_long
* Signature: (I)J
*/
JNIEXPORT jlong JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Tget_1size_1long
(JNIEnv *env, jclass clss, jint type_id)
{
size_t retVal = 0;
retVal = H5Tget_size(type_id );
if (retVal == 0) {
h5libraryError(env);
}
return (jlong)retVal;
}
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Tset_size
* Signature: (IJ)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Tset_1size
(JNIEnv *env, jclass clss, jint type_id, jlong size)
{
herr_t retVal = -1;
retVal = H5Tset_size(type_id, (size_t)size );
if (retVal < 0) {
h5libraryError(env);
}
return (jint)retVal;
}
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Tget_order
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Tget_1order
(JNIEnv *env, jclass clss, jint type_id)
{
H5T_order_t retVal = H5T_ORDER_ERROR;
retVal = H5Tget_order(type_id );
if (retVal == H5T_ORDER_ERROR) {
h5libraryError(env);
}
return (jint)retVal;
}
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Tset_order
* Signature: (II)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Tset_1order
(JNIEnv *env, jclass clss, jint type_id, jint order)
{
herr_t retVal = -1;
retVal = H5Tset_order(type_id, (H5T_order_t)order);
if (retVal < 0) {
h5libraryError(env);
}
return (jint)retVal;
}
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Tget_precision
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Tget_1precision
(JNIEnv *env, jclass clss, jint type_id)
{
size_t retVal = 0;
retVal = H5Tget_precision(type_id);
if (retVal == 0) {
h5libraryError(env);
}
return (jint)retVal;
}
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Tget_precision_long
* Signature: (I)J
*/
JNIEXPORT jlong JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Tget_1precision_1long
(JNIEnv *env, jclass clss, jint type_id)
{
size_t retVal = 0;
retVal = H5Tget_precision(type_id);
if (retVal == 0) {
h5libraryError(env);
}
return (jlong)retVal;
}
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Tset_precision
* Signature: (IJ)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Tset_1precision
(JNIEnv *env, jclass clss, jint type_id, jlong precision)
{
herr_t retVal = -1;
retVal = H5Tset_precision(type_id, (size_t)precision);
if (retVal < 0) {
h5libraryError(env);
}
return (jint)retVal;
}
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Tget_offset
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Tget_1offset
(JNIEnv *env, jclass clss, jint type_id)
{
int retVal = 0;
retVal = H5Tget_offset(type_id);
if (retVal < 0) {
h5libraryError(env);
}
return (jint)retVal;
}
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Tset_offset
* Signature: (IJ)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Tset_1offset
(JNIEnv *env, jclass clss, jint type_id, jlong offset)
{
herr_t retVal = -1;
retVal = H5Tset_offset(type_id, (size_t)offset);
if (retVal < 0) {
h5libraryError(env);
}
return (jint)retVal;
}
/*
* Class: ncsa_hdf_hdf5lib_H5
* Method: H5Tget_pad
* Signature: (I[I)I
*/
JNIEXPORT jint JNICALL Java_ncsa_hdf_hdf5lib_H5_H5Tget_1pad
(JNIEnv *env, jclass clss, jint type_id, jintArray pad)
{
herr_t status;
jboolean isCopy;
jint *P;
if (pad == NULL) {
h5nullArgument( env, "H5Tget_pad: pad is NULL");
return -1;
}
P = ENVPTR->GetIntArrayElements(ENVPAR pad,&isCopy);
if (P == NULL) {