Move Java wrappers to FFM using jextract and java 25 (#5957)

FFM build requires Java 25, Jextract 25.
Generates FFM bindings during configure.
JNI is default when the requirements are not met or can be forced.
Presets added for maven and FFM - JNI is default selection.
Enhanced Maven options will work with either JNI or FFM
New Workflows for testing and maven uploads.
Extensive documentation changes for java.
This commit is contained in:
Allen Byrne
2025-11-04 14:03:06 -06:00
committed by GitHub
parent 18297c1923
commit b754dcb8f2
621 changed files with 104632 additions and 4346 deletions
+40
View File
@@ -0,0 +1,40 @@
cmake_minimum_required (VERSION 3.26)
project (HDF5_JAVA_SRCJNI C)
#-----------------------------------------------------------------------------
# Include the main src and config directories
#-----------------------------------------------------------------------------
set (HDF5_JAVA_INCLUDE_DIRECTORIES
${JAVA_INCLUDE_PATH}
${JAVA_INCLUDE_PATH2}
)
set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "${HDF5_JAVA_INCLUDE_DIRECTORIES}")
set (CMAKE_JAVA_INCLUDE_PATH "")
#-----------------------------------------------------------------------------
# Traverse source subdirectory
#-----------------------------------------------------------------------------
message (VERBOSE "Java version is ${Java_VERSION_STRING}")
message (VERBOSE "JAVA: JAVA_HOME=$ENV{JAVA_HOME} JAVA_ROOT=$ENV{JAVA_ROOT}")
find_package (JNI)
message (VERBOSE "JNI_LIBRARIES=${JNI_LIBRARIES}")
message (VERBOSE "JNI_INCLUDE_DIRS=${JNI_INCLUDE_DIRS}")
list (APPEND HDF5_JAVA_INCLUDE_DIRECTORIES
${JNI_INCLUDE_DIRS}
${HDF5_JAVA_SRCJNI_JNI_SRC_DIR}
)
#-----------------------------------------------------------------------------
# Traverse source subdirectory
#-----------------------------------------------------------------------------
add_subdirectory (jni)
add_subdirectory (hdf)
#-----------------------------------------------------------------------------
# Testing
#-----------------------------------------------------------------------------
if (NOT HDF5_EXTERNALLY_CONFIGURED AND BUILD_TESTING)
add_subdirectory (test)
endif ()
+5
View File
@@ -0,0 +1,5 @@
cmake_minimum_required (VERSION 3.26)
project (HDF5_JAVA_SRCJNI_HDF C)
add_subdirectory (hdf5lib)
+251
View File
@@ -0,0 +1,251 @@
#-----------------------------------------------------------------------------
# CMake configuration for HDF5 Java hdf.hdf5lib package
# This file sets up the build, packaging, and installation rules for the HDF5 Java hdf.hdf5lib package.
# It handles Java source grouping, JAR creation, JNI dependencies, and formatting for the HDF5 Java bindings.
#-----------------------------------------------------------------------------
cmake_minimum_required (VERSION 3.26)
project (HDF5_JAVA_SRCJNI_HDF_HDF5 Java)
set (CMAKE_VERBOSE_MAKEFILE 1)
set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "${HDF5_JAVA_HDF_HDF5_SOURCE_DIR};${HDF5_JAVA_HDF_HDF5_BINARY_DIR};${HDF5_JAVA_LIB_DIR};${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${HDF5_JAVA_HDF5_LIB_CORENAME}.dir/hdf/hdf5lib")
SET_GLOBAL_VARIABLE (HDF5_JAVA_SOURCE_PACKAGES
"${HDF5_JAVA_SOURCE_PACKAGES};hdf.hdf5lib.callbacks;hdf.hdf5lib.exceptions;hdf.hdf5lib.structs;hdf.hdf5lib"
)
set (HDF5_JAVA_HDF_HDF5_CALLBACKS_SOURCES
callbacks/H5Callbacks.java
callbacks/H5A_iterate_cb.java
callbacks/H5A_iterate_t.java
callbacks/H5D_append_cb.java
callbacks/H5D_append_t.java
callbacks/H5D_iterate_cb.java
callbacks/H5D_iterate_t.java
callbacks/H5E_walk_cb.java
callbacks/H5E_walk_t.java
callbacks/H5L_iterate_t.java
callbacks/H5L_iterate_opdata_t.java
callbacks/H5O_iterate_t.java
callbacks/H5O_iterate_opdata_t.java
callbacks/H5P_cls_close_func_cb.java
callbacks/H5P_cls_close_func_t.java
callbacks/H5P_cls_copy_func_cb.java
callbacks/H5P_cls_copy_func_t.java
callbacks/H5P_cls_create_func_cb.java
callbacks/H5P_cls_create_func_t.java
callbacks/H5P_prp_close_func_cb.java
callbacks/H5P_prp_compare_func_cb.java
callbacks/H5P_prp_copy_func_cb.java
callbacks/H5P_prp_create_func_cb.java
callbacks/H5P_prp_delete_func_cb.java
callbacks/H5P_prp_get_func_cb.java
callbacks/H5P_prp_set_func_cb.java
callbacks/H5P_iterate_cb.java
callbacks/H5P_iterate_t.java
)
set (HDF5_JAVADOC_HDF_HDF5_CALLBACKS_SOURCES
${HDF5_JAVA_HDF_HDF5_CALLBACKS_SOURCES}
callbacks/package-info.java
)
set (HDF5_JAVA_HDF_HDF5_EXCEPTIONS_SOURCES
exceptions/HDF5Exception.java
exceptions/HDF5IdException.java
exceptions/HDF5AttributeException.java
exceptions/HDF5BtreeException.java
exceptions/HDF5DataFiltersException.java
exceptions/HDF5DatasetInterfaceException.java
exceptions/HDF5DataspaceInterfaceException.java
exceptions/HDF5DataStorageException.java
exceptions/HDF5DatatypeInterfaceException.java
exceptions/HDF5ExternalFileListException.java
exceptions/HDF5FileInterfaceException.java
exceptions/HDF5FunctionArgumentException.java
exceptions/HDF5FunctionEntryExitException.java
exceptions/HDF5HeapException.java
exceptions/HDF5InternalErrorException.java
exceptions/HDF5JavaException.java
exceptions/HDF5LibraryException.java
exceptions/HDF5LowLevelIOException.java
exceptions/HDF5MetaDataCacheException.java
exceptions/HDF5ObjectHeaderException.java
exceptions/HDF5PropertyListInterfaceException.java
exceptions/HDF5ReferenceException.java
exceptions/HDF5ResourceUnavailableException.java
exceptions/HDF5SymbolTableException.java
)
set (HDF5_JAVADOC_HDF_HDF5_EXCEPTIONS_SOURCES
${HDF5_JAVA_HDF_HDF5_EXCEPTIONS_SOURCES}
exceptions/package-info.java
)
set (HDF5_JAVA_HDF_HDF5_STRUCTS_SOURCES
structs/H5_ih_info_t.java
structs/H5A_info_t.java
structs/H5AC_cache_config_t.java
structs/H5E_error2_t.java
structs/H5F_info2_t.java
structs/H5FD_ros3_fapl_t.java
structs/H5FD_hdfs_fapl_t.java
structs/H5G_info_t.java
structs/H5L_info_t.java
structs/H5O_hdr_info_t.java
structs/H5O_info_t.java
structs/H5O_native_info_t.java
structs/H5O_token_t.java
)
set (HDF5_JAVADOC_HDF_HDF5_STRUCTS_SOURCES
${HDF5_JAVA_HDF_HDF5_STRUCTS_SOURCES}
structs/package-info.java
)
set (HDF5_JAVA_HDF_HDF5_SOURCES
HDFArray.java
HDF5Constants.java
HDFNativeData.java
H5.java
)
set (HDF5_JAVADOC_HDF_HDF5_SOURCES
${HDF5_JAVA_HDF_HDF5_SOURCES}
package-info.java
)
set (CMAKE_JNI_TARGET TRUE)
file (WRITE ${PROJECT_BINARY_DIR}/Manifest.txt
"Enable-Native-Access: ALL-UNNAMED
"
)
set (CMAKE_JAVA_INCLUDE_PATH "${HDF5_JAVA_LOGGING_JAR}")
# Create main JAR with platform classifier if Maven deployment is enabled
if (HDF5_ENABLE_MAVEN_DEPLOY)
# Determine platform and architecture for Maven classifiers
if (WIN32)
set (HDF5_MAVEN_PLATFORM "windows")
elseif (APPLE)
set (HDF5_MAVEN_PLATFORM "macos")
else ()
set (HDF5_MAVEN_PLATFORM "linux")
endif ()
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
if (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|arm64")
set (HDF5_MAVEN_ARCHITECTURE "aarch64")
else ()
set (HDF5_MAVEN_ARCHITECTURE "x86_64")
endif ()
else ()
set (HDF5_MAVEN_ARCHITECTURE "x86")
endif ()
# Set version suffix for snapshots vs releases
if (HDF5_MAVEN_SNAPSHOT)
set (HDF5_MAVEN_VERSION_SUFFIX "-SNAPSHOT")
else ()
set (HDF5_MAVEN_VERSION_SUFFIX "")
endif ()
# Build JAR once with platform classifier - this is the primary JAR
set (HDF5_JAR_CLASSIFIER "${HDF5_MAVEN_PLATFORM}-${HDF5_MAVEN_ARCHITECTURE}")
add_jar (${HDF5_JAVA_HDF5_LIB_TARGET}
OUTPUT_NAME "${HDF5_JAVA_HDF5_LIB_TARGET}-${HDF5_PACKAGE_VERSION}${HDF5_MAVEN_VERSION_SUFFIX}-${HDF5_JAR_CLASSIFIER}"
MANIFEST ${PROJECT_BINARY_DIR}/Manifest.txt
${HDF5_JAVA_HDF_HDF5_CALLBACKS_SOURCES}
${HDF5_JAVA_HDF_HDF5_EXCEPTIONS_SOURCES}
${HDF5_JAVA_HDF_HDF5_STRUCTS_SOURCES}
${HDF5_JAVA_HDF_HDF5_SOURCES}
)
# Get the JAR file path for the platform-specific JAR
get_target_property (HDF5_JAVA_PLATFORM_JAR_FILE ${HDF5_JAVA_HDF5_LIB_TARGET} JAR_FILE)
# Define the universal JAR name and path (without classifier)
set (HDF5_JAVA_UNIVERSAL_JAR_NAME "${HDF5_JAVA_HDF5_LIB_TARGET}-${HDF5_PACKAGE_VERSION}${HDF5_MAVEN_VERSION_SUFFIX}.jar")
set (HDF5_JAVA_UNIVERSAL_JAR_FILE "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_JAVA_UNIVERSAL_JAR_NAME}")
# Create universal JAR by copying the platform-specific JAR
set (HDF5_JAVA_UNIVERSAL_TARGET "${HDF5_JAVA_HDF5_LIB_TARGET}-universal")
add_custom_command (
OUTPUT ${HDF5_JAVA_UNIVERSAL_JAR_FILE}
COMMAND ${CMAKE_COMMAND} -E copy ${HDF5_JAVA_PLATFORM_JAR_FILE} ${HDF5_JAVA_UNIVERSAL_JAR_FILE}
DEPENDS ${HDF5_JAVA_HDF5_LIB_TARGET}
COMMENT "Creating universal JAR ${HDF5_JAVA_UNIVERSAL_JAR_NAME} from platform-specific JAR"
)
# Create a target for the universal JAR
add_custom_target (${HDF5_JAVA_UNIVERSAL_TARGET} ALL
DEPENDS ${HDF5_JAVA_UNIVERSAL_JAR_FILE}
)
set_target_properties (${HDF5_JAVA_UNIVERSAL_TARGET} PROPERTIES FOLDER libraries/java)
# Install both JARs
install_jar (${HDF5_JAVA_HDF5_LIB_TARGET} LIBRARY DESTINATION ${HDF5_INSTALL_JAR_DIR} COMPONENT maven)
install (FILES ${HDF5_JAVA_UNIVERSAL_JAR_FILE} DESTINATION ${HDF5_INSTALL_JAR_DIR} COMPONENT libraries)
# Update global variables for both JARs
# Use universal JAR for examples/tests (for compatibility)
SET_GLOBAL_VARIABLE (HDF5_JAVA_JARS "${HDF5_JAVA_JARS};${HDF5_JAVA_UNIVERSAL_JAR_FILE}")
# Export both JARs for installation
SET_GLOBAL_VARIABLE (HDF5_JAVA_JARS_TO_EXPORT "${HDF5_JAVA_JARS_TO_EXPORT};${HDF5_JAVA_UNIVERSAL_JAR_FILE}")
SET_GLOBAL_VARIABLE (HDF5_MAVEN_PLATFORM_JAR_FILE "${HDF5_JAVA_PLATFORM_JAR_FILE}")
else ()
# Standard JAR creation without Maven classifiers
add_jar (${HDF5_JAVA_HDF5_LIB_TARGET} OUTPUT_NAME "${HDF5_JAVA_HDF5_LIB_TARGET}-${HDF5_PACKAGE_VERSION}" MANIFEST ${PROJECT_BINARY_DIR}/Manifest.txt ${HDF5_JAVA_HDF_HDF5_CALLBACKS_SOURCES} ${HDF5_JAVA_HDF_HDF5_EXCEPTIONS_SOURCES} ${HDF5_JAVA_HDF_HDF5_STRUCTS_SOURCES} ${HDF5_JAVA_HDF_HDF5_SOURCES})
install_jar (${HDF5_JAVA_HDF5_LIB_TARGET} LIBRARY DESTINATION ${HDF5_INSTALL_JAR_DIR} COMPONENT libraries)
# For non-Maven builds, use the standard JAR
get_target_property (${HDF5_JAVA_HDF5_LIB_TARGET}_JAR_FILE ${HDF5_JAVA_HDF5_LIB_TARGET} JAR_FILE)
SET_GLOBAL_VARIABLE (HDF5_JAVA_JARS "${HDF5_JAVA_JARS};${${HDF5_JAVA_HDF5_LIB_TARGET}_JAR_FILE}")
SET_GLOBAL_VARIABLE (HDF5_JAVA_JARS_TO_EXPORT "${HDF5_JAVA_JARS_TO_EXPORT};${${HDF5_JAVA_HDF5_LIB_TARGET}_JAR_FILE}")
endif ()
# Always export the platform-specific JAR for reference (used by Maven deployment)
get_target_property (${HDF5_JAVA_HDF5_LIB_TARGET}_JAR_FILE ${HDF5_JAVA_HDF5_LIB_TARGET} JAR_FILE)
SET_GLOBAL_VARIABLE (HDF5_JAVA_JARS_TO_EXPORT "${HDF5_JAVA_JARS_TO_EXPORT};${${HDF5_JAVA_HDF5_LIB_TARGET}_JAR_FILE}")
message (STATUS "HDF5 JNI java lib: ${HDF5_JAVA_JNI_LIB_TARGET} jar: ${HDF5_JAVA_HDF5_LIB_TARGET}")
add_dependencies (${HDF5_JAVA_HDF5_LIB_TARGET} ${HDF5_JAVA_JNI_LIB_TARGET})
set_target_properties (${HDF5_JAVA_HDF5_LIB_TARGET} PROPERTIES FOLDER libraries/java)
# Set HDF5_JAVA_LIBRARY for examples to depend on
SET_GLOBAL_VARIABLE (HDF5_JAVA_LIBRARY ${HDF5_JAVA_HDF5_LIB_TARGET})
#-----------------------------------------------------------------------------
# Maven POM Generation
#-----------------------------------------------------------------------------
if (HDF5_ENABLE_MAVEN_DEPLOY)
# Configure timestamp for build metadata
string (TIMESTAMP CMAKE_CONFIGURE_DATE "%Y-%m-%d %H:%M:%S UTC" UTC)
# Generate POM file from template
configure_file (
${CMAKE_CURRENT_SOURCE_DIR}/pom.xml.in
${CMAKE_CURRENT_BINARY_DIR}/pom.xml
@ONLY
)
# Install POM file for deployment
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/pom.xml
DESTINATION ${HDF5_INSTALL_JAR_DIR}
COMPONENT maven
)
# Add Maven deployment information to global variables
SET_GLOBAL_VARIABLE (HDF5_MAVEN_POM_FILE "${CMAKE_CURRENT_BINARY_DIR}/pom.xml")
SET_GLOBAL_VARIABLE (HDF5_MAVEN_PLATFORM_CLASSIFIER "${HDF5_MAVEN_PLATFORM}-${HDF5_MAVEN_ARCHITECTURE}")
message (STATUS "Maven POM configured: ${HDF5_MAVEN_PLATFORM}-${HDF5_MAVEN_ARCHITECTURE}")
endif ()
if (HDF5_ENABLE_FORMATTERS)
clang_format (HDF5_JAVA_SRC_FORMAT ${HDF5_JAVA_HDF_HDF5_CALLBACKS_SOURCES} ${HDF5_JAVA_HDF_HDF5_EXCEPTIONS_SOURCES} ${HDF5_JAVA_HDF_HDF5_STRUCTS_SOURCES} ${HDF5_JAVA_HDF_HDF5_SOURCES})
endif ()
set (CMAKE_JAVA_INCLUDE_PATH "")
File diff suppressed because it is too large Load Diff
+3074
View File
@@ -0,0 +1,3074 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib;
import hdf.hdf5lib.structs.H5O_token_t;
/**
* \page HDF5CONST Constants and Enumerated Types
* This class contains C constants and enumerated types of HDF5 library. The
* values of these constants are obtained from the library by calling
* the JNI function jconstant, where jconstant is used for any of the private constants
* which start their name with "H5" need to be converted.
* <P>
* <B>Do not edit this file!</b>
*
* @see @ref HDF5LIB
*/
public class HDF5Constants {
static { H5.loadH5Lib(); }
// /////////////////////////////////////////////////////////////////////////
// Get the HDF5 constants from the library //
// /////////////////////////////////////////////////////////////////////////
/** Special parameters for szip compression */
public static final int H5_SZIP_MAX_PIXELS_PER_BLOCK = H5_SZIP_MAX_PIXELS_PER_BLOCK();
/** Special parameters for szip compression */
public static final int H5_SZIP_NN_OPTION_MASK = H5_SZIP_NN_OPTION_MASK();
/** Special parameters for szip compression */
public static final int H5_SZIP_EC_OPTION_MASK = H5_SZIP_EC_OPTION_MASK();
/** Special parameters for szip compression */
public static final int H5_SZIP_ALLOW_K13_OPTION_MASK = H5_SZIP_ALLOW_K13_OPTION_MASK();
/** Special parameters for szip compression */
public static final int H5_SZIP_CHIP_OPTION_MASK = H5_SZIP_CHIP_OPTION_MASK();
/** indices on links, unknown index type */
public static final int H5_INDEX_UNKNOWN = H5_INDEX_UNKNOWN();
/** indices on links, index on names */
public static final int H5_INDEX_NAME = H5_INDEX_NAME();
/** indices on links, index on creation order */
public static final int H5_INDEX_CRT_ORDER = H5_INDEX_CRT_ORDER();
/** indices on links, number of indices defined */
public static final int H5_INDEX_N = H5_INDEX_N();
/** Common iteration orders, Unknown order */
public static final int H5_ITER_UNKNOWN = H5_ITER_UNKNOWN();
/** Common iteration orders, Increasing order */
public static final int H5_ITER_INC = H5_ITER_INC();
/** Common iteration orders, Decreasing order */
public static final int H5_ITER_DEC = H5_ITER_DEC();
/** Common iteration orders, No particular order, whatever is fastest */
public static final int H5_ITER_NATIVE = H5_ITER_NATIVE();
/** Common iteration orders, Number of iteration orders */
public static final int H5_ITER_N = H5_ITER_N();
/** The version of the H5AC_cache_config_t in use */
public static final int H5AC_CURR_CACHE_CONFIG_VERSION = H5AC_CURR_CACHE_CONFIG_VERSION();
/** The maximum length of the trace file path */
public static final int H5AC_MAX_TRACE_FILE_NAME_LEN = H5AC_MAX_TRACE_FILE_NAME_LEN();
/**
* When metadata_write_strategy is set to this value, only process
* zero is allowed to write dirty metadata to disk. All other
* processes must retain dirty metadata until they are informed at
* a sync point that the dirty metadata in question has been written
* to disk.
*/
public static final int H5AC_METADATA_WRITE_STRATEGY_PROCESS_ZERO_ONLY =
H5AC_METADATA_WRITE_STRATEGY_PROCESS_ZERO_ONLY();
/**
* In the distributed metadata write strategy, process zero still makes
* the decisions as to what entries should be flushed, but the actual
* flushes are distributed across the processes in the computation to
* the extent possible.
*/
public static final int H5AC_METADATA_WRITE_STRATEGY_DISTRIBUTED =
H5AC_METADATA_WRITE_STRATEGY_DISTRIBUTED();
/** Don't attempt to increase the size of the cache automatically */
public static final int H5C_incr_off = H5C_incr_off();
/**
* Attempt to increase the size of the cache
* whenever the average hit rate over the last epoch drops
* below the value supplied in the lower_hr_threshold
* field
*/
public static final int H5C_incr_threshold = H5C_incr_threshold();
/** Don't perform flash increases in the size of the cache */
public static final int H5C_flash_incr_off = H5C_flash_incr_off();
/** increase the current maximum cache size by x * flash_multiple less any free space in the cache */
public static final int H5C_flash_incr_add_space = H5C_flash_incr_add_space();
/** Don't attempt to decrease the size of the cache automatically */
public static final int H5C_decr_off = H5C_decr_off();
/**
* Attempt to decrease the size of the cache
* whenever the average hit rate over the last epoch rises
* above the value supplied in the upper_hr_threshold
* field
*/
public static final int H5C_decr_threshold = H5C_decr_threshold();
/**
* At the end of each epoch, search the cache for
* entries that have not been accessed for at least the number
* of epochs specified in the epochs_before_eviction field, and
* evict these entries
*/
public static final int H5C_decr_age_out = H5C_decr_age_out();
/**
* Same as age_out, but we only
* attempt to reduce the cache size when the hit rate observed
* over the last epoch exceeds the value provided in the
* upper_hr_threshold field
*/
public static final int H5C_decr_age_out_with_threshold = H5C_decr_age_out_with_threshold();
/** */
public static final int H5D_CHUNK_IDX_BTREE = H5D_CHUNK_IDX_BTREE();
/** */
public static final int H5D_ALLOC_TIME_DEFAULT = H5D_ALLOC_TIME_DEFAULT();
/** */
public static final int H5D_ALLOC_TIME_EARLY = H5D_ALLOC_TIME_EARLY();
/** */
public static final int H5D_ALLOC_TIME_ERROR = H5D_ALLOC_TIME_ERROR();
/** */
public static final int H5D_ALLOC_TIME_INCR = H5D_ALLOC_TIME_INCR();
/** */
public static final int H5D_ALLOC_TIME_LATE = H5D_ALLOC_TIME_LATE();
/** */
public static final int H5D_FILL_TIME_ERROR = H5D_FILL_TIME_ERROR();
/** */
public static final int H5D_FILL_TIME_ALLOC = H5D_FILL_TIME_ALLOC();
/** */
public static final int H5D_FILL_TIME_NEVER = H5D_FILL_TIME_NEVER();
/** */
public static final int H5D_FILL_TIME_IFSET = H5D_FILL_TIME_IFSET();
/** */
public static final int H5D_FILL_VALUE_DEFAULT = H5D_FILL_VALUE_DEFAULT();
/** */
public static final int H5D_FILL_VALUE_ERROR = H5D_FILL_VALUE_ERROR();
/** */
public static final int H5D_FILL_VALUE_UNDEFINED = H5D_FILL_VALUE_UNDEFINED();
/** */
public static final int H5D_FILL_VALUE_USER_DEFINED = H5D_FILL_VALUE_USER_DEFINED();
/** */
public static final int H5D_LAYOUT_ERROR = H5D_LAYOUT_ERROR();
/** */
public static final int H5D_CHUNKED = H5D_CHUNKED();
/** */
public static final int H5D_COMPACT = H5D_COMPACT();
/** */
public static final int H5D_CONTIGUOUS = H5D_CONTIGUOUS();
/** */
public static final int H5D_VIRTUAL = H5D_VIRTUAL();
/** */
public static final int H5D_NLAYOUTS = H5D_NLAYOUTS();
/** */
public static final int H5D_SPACE_STATUS_ALLOCATED = H5D_SPACE_STATUS_ALLOCATED();
/** */
public static final int H5D_SPACE_STATUS_ERROR = H5D_SPACE_STATUS_ERROR();
/** */
public static final int H5D_SPACE_STATUS_NOT_ALLOCATED = H5D_SPACE_STATUS_NOT_ALLOCATED();
/** */
public static final int H5D_SPACE_STATUS_PART_ALLOCATED = H5D_SPACE_STATUS_PART_ALLOCATED();
/** */
public static final int H5D_VDS_ERROR = H5D_VDS_ERROR();
/** */
public static final int H5D_VDS_FIRST_MISSING = H5D_VDS_FIRST_MISSING();
/** */
public static final int H5D_VDS_LAST_AVAILABLE = H5D_VDS_LAST_AVAILABLE();
/** */
public static final int H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS = H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS();
/** Different kinds of error information - H5E_type_t */
public static final int H5E_MAJOR = H5E_MAJOR();
/** Different kinds of error information - H5E_type_t */
public static final int H5E_MINOR = H5E_MINOR();
/** Minor error codes - Object header related errors - Alignment error */
public static final long H5E_ALIGNMENT = H5E_ALIGNMENT();
/** Minor error codes - Resource errors - Object already exists */
public static final long H5E_ALREADYEXISTS = H5E_ALREADYEXISTS();
/** Minor error codes - Function entry/exit interface - Object already initialized */
public static final long H5E_ALREADYINIT = H5E_ALREADYINIT();
/** Major error codes - Invalid arguments to routine */
public static final long H5E_ARGS = H5E_ARGS();
/** Major error codes - Object ID */
public static final long H5E_ID = H5E_ID();
/** Major error codes - Attribute */
public static final long H5E_ATTR = H5E_ATTR();
/** Minor error codes - Object ID related errors - Unable to find ID information (already closed?) */
public static final long H5E_BADID = H5E_BADID();
/** Minor error codes - File accessibility errors - Bad file ID accessed */
public static final long H5E_BADFILE = H5E_BADFILE();
/** Minor error codes - Object ID related errors - Unable to find ID group information */
public static final long H5E_BADGROUP = H5E_BADGROUP();
/** Minor error codes - Object header related errors - Iteration failed */
public static final long H5E_BADITER = H5E_BADITER();
/** Minor error codes - Object header related errors - Unrecognized message */
public static final long H5E_BADMESG = H5E_BADMESG();
/** Minor error codes - Argument errors - Out of range */
public static final long H5E_BADRANGE = H5E_BADRANGE();
/** Minor error codes - Dataspace errors - Invalid selection */
public static final long H5E_BADSELECT = H5E_BADSELECT();
/** Datatype conversion errors - Bad size for object */
public static final long H5E_BADSIZE = H5E_BADSIZE();
/** Minor error codes - Argument errors - Inappropriate type */
public static final long H5E_BADTYPE = H5E_BADTYPE();
/** Minor error codes - Argument errors - Bad value */
public static final long H5E_BADVALUE = H5E_BADVALUE();
/** Major error codes - B-Tree node */
public static final long H5E_BTREE = H5E_BTREE();
/** Major error codes - Object cache */
public static final long H5E_CACHE = H5E_CACHE();
/** I/O pipeline errors - Callback failed */
public static final long H5E_CALLBACK = H5E_CALLBACK();
/** I/O pipeline errors - Error from filter 'can apply' callback */
public static final long H5E_CANAPPLY = H5E_CANAPPLY();
/** Minor error codes - Resource errors - Can't allocate space */
public static final long H5E_CANTALLOC = H5E_CANTALLOC();
/** Minor error codes - Dataspace errors - Can't append object */
public static final long H5E_CANTAPPEND = H5E_CANTAPPEND();
/** Minor error codes - Heap errors - Can't attach object */
public static final long H5E_CANTATTACH = H5E_CANTATTACH();
/** Minor error codes - Cache related errors - Unable to mark metadata as clean */
public static final long H5E_CANTCLEAN = H5E_CANTCLEAN();
/** Minor error codes - Dataspace errors - Can't clip hyperslab region */
public static final long H5E_CANTCLIP = H5E_CANTCLIP();
/** Minor error codes - File accessibility errors - Unable to close file */
public static final long H5E_CANTCLOSEFILE = H5E_CANTCLOSEFILE();
/** Minor error codes - Group related errors - Can't close object */
public static final long H5E_CANTCLOSEOBJ = H5E_CANTCLOSEOBJ();
/** Minor error codes - Dataspace errors - Can't compare objects */
public static final long H5E_CANTCOMPARE = H5E_CANTCOMPARE();
/** Minor error codes - Heap errors - Can't compute value */
public static final long H5E_CANTCOMPUTE = H5E_CANTCOMPUTE();
/** Datatype conversion errors - Can't convert datatypes */
public static final long H5E_CANTCONVERT = H5E_CANTCONVERT();
/** Minor error codes - Resource errors - Unable to copy object */
public static final long H5E_CANTCOPY = H5E_CANTCOPY();
/** Minor error codes - Cache related errors - Unable to cork an object */
public static final long H5E_CANTCORK = H5E_CANTCORK();
/** Minor error codes - Dataspace errors - Can't count elements */
public static final long H5E_CANTCOUNT = H5E_CANTCOUNT();
/** Minor error codes - File accessibility errors - Unable to create file */
public static final long H5E_CANTCREATE = H5E_CANTCREATE();
/** Minor error codes - Object ID related errors - Unable to decrement reference count */
public static final long H5E_CANTDEC = H5E_CANTDEC();
/** Minor error codes - B-tree related errors - Unable to decode value */
public static final long H5E_CANTDECODE = H5E_CANTDECODE();
/** Minor error codes - Object header related errors - Can't delete message */
public static final long H5E_CANTDELETE = H5E_CANTDELETE();
/** Minor error codes - File accessibility errors - Unable to delete file */
public static final long H5E_CANTDELETEFILE = H5E_CANTDELETEFILE();
/** Minor error codes - Cache related errors - Unable to create a flush dependency */
public static final long H5E_CANTDEPEND = H5E_CANTDEPEND();
/** Minor error codes - Cache related errors - Unable to mark metadata as dirty */
public static final long H5E_CANTDIRTY = H5E_CANTDIRTY();
/** Minor error codes - B-tree related errors - Unable to encode value */
public static final long H5E_CANTENCODE = H5E_CANTENCODE();
/** Minor error codes - Cache related errors - Unable to expunge a metadata cache entry */
public static final long H5E_CANTEXPUNGE = H5E_CANTEXPUNGE();
/** Minor error codes - Heap errors - Can't extend heap's space */
public static final long H5E_CANTEXTEND = H5E_CANTEXTEND();
/** I/O pipeline errors - Filter operation failed */
public static final long H5E_CANTFILTER = H5E_CANTFILTER();
/** Minor error codes - Cache related errors - Unable to flush data from cache */
public static final long H5E_CANTFLUSH = H5E_CANTFLUSH();
/** Minor error codes - Resource errors - Unable to free object */
public static final long H5E_CANTFREE = H5E_CANTFREE();
/** Minor error codes - Parallel MPI - Can't gather data */
public static final long H5E_CANTGATHER = H5E_CANTGATHER();
/** Minor error codes - Resource errors - Unable to garbage collect */
public static final long H5E_CANTGC = H5E_CANTGC();
/** Minor error codes - Property list errors - Can't get value */
public static final long H5E_CANTGET = H5E_CANTGET();
/** Minor error codes - Resource errors - Unable to compute size */
public static final long H5E_CANTGETSIZE = H5E_CANTGETSIZE();
/** Minor error codes - Object ID related errors - Unable to increment reference count */
public static final long H5E_CANTINC = H5E_CANTINC();
/** Minor error codes - Function entry/exit interface - Unable to initialize object */
public static final long H5E_CANTINIT = H5E_CANTINIT();
/** Minor error codes - Cache related errors - Unable to insert metadata into cache */
public static final long H5E_CANTINS = H5E_CANTINS();
/** Minor error codes - B-tree related errors - Unable to insert object */
public static final long H5E_CANTINSERT = H5E_CANTINSERT();
/** Minor error codes - B-tree related errors - Unable to list node */
public static final long H5E_CANTLIST = H5E_CANTLIST();
/** Minor error codes - Cache related errors - Unable to load metadata into cache */
public static final long H5E_CANTLOAD = H5E_CANTLOAD();
/** Minor error codes - Resource errors - Unable to lock object */
public static final long H5E_CANTLOCK = H5E_CANTLOCK();
/** Minor error codes - File accessibility errors Unable to lock file */
public static final long H5E_CANTLOCKFILE = H5E_CANTLOCKFILE();
/** Minor error codes - Cache related errors - Unable to mark a pinned entry as clean */
public static final long H5E_CANTMARKCLEAN = H5E_CANTMARKCLEAN();
/** Minor error codes - Cache related errors - Unable to mark a pinned entry as dirty */
public static final long H5E_CANTMARKDIRTY = H5E_CANTMARKDIRTY();
/** Minor error codes - Cache related errors - Unable to mark an entry as unserialized */
public static final long H5E_CANTMARKSERIALIZED = H5E_CANTMARKSERIALIZED();
/** Minor error codes - Cache related errors - Unable to mark an entry as serialized */
public static final long H5E_CANTMARKUNSERIALIZED = H5E_CANTMARKUNSERIALIZED();
/** Minor error codes - Free space errors - Can't merge objects */
public static final long H5E_CANTMERGE = H5E_CANTMERGE();
/** Minor error codes - B-tree related errors - Unable to modify record */
public static final long H5E_CANTMODIFY = H5E_CANTMODIFY();
/** Minor error codes - Link related errors - Can't move object */
public static final long H5E_CANTMOVE = H5E_CANTMOVE();
/** Minor error codes - Dataspace errors - Can't move to next iterator location */
public static final long H5E_CANTNEXT = H5E_CANTNEXT();
/** Minor error codes - Cache related errors - Unable to notify object about action */
public static final long H5E_CANTNOTIFY = H5E_CANTNOTIFY();
/** Minor error codes - File accessibility errors - Unable to open file */
public static final long H5E_CANTOPENFILE = H5E_CANTOPENFILE();
/** Minor error codes - Group related errors - Can't open object */
public static final long H5E_CANTOPENOBJ = H5E_CANTOPENOBJ();
/** Minor error codes - Heap errors - Can't operate on object */
public static final long H5E_CANTOPERATE = H5E_CANTOPERATE();
/** Minor error codes - Object header related errors - Can't pack messages */
public static final long H5E_CANTPACK = H5E_CANTPACK();
/** Minor error codes - Cache related errors - Unable to pin cache entry */
public static final long H5E_CANTPIN = H5E_CANTPIN();
/** Minor error codes - Cache related errors - Unable to protect metadata */
public static final long H5E_CANTPROTECT = H5E_CANTPROTECT();
/** Minor error codes - Parallel MPI - Can't receive data */
public static final long H5E_CANTRECV = H5E_CANTRECV();
/** Minor error codes - B-tree related errors - Unable to redistribute records */
public static final long H5E_CANTREDISTRIBUTE = H5E_CANTREDISTRIBUTE();
/** Minor error codes - Object ID related errors - Unable to register new ID */
public static final long H5E_CANTREGISTER = H5E_CANTREGISTER();
/** Minor error codes - Function entry/exit interface - Unable to release object */
public static final long H5E_CANTRELEASE = H5E_CANTRELEASE();
/** Minor error codes - B-tree related errors - Unable to remove object */
public static final long H5E_CANTREMOVE = H5E_CANTREMOVE();
/** Minor error codes - Object header related errors - Unable to rename object */
public static final long H5E_CANTRENAME = H5E_CANTRENAME();
/** Minor error codes - Object header related errors - Can't reset object */
public static final long H5E_CANTRESET = H5E_CANTRESET();
/** Minor error codes - Cache related errors - Unable to resize a metadata cache entry */
public static final long H5E_CANTRESIZE = H5E_CANTRESIZE();
/** Minor error codes - Heap errors - Can't restore condition */
public static final long H5E_CANTRESTORE = H5E_CANTRESTORE();
/** Minor error codes - Free space errors - Can't revive object */
public static final long H5E_CANTREVIVE = H5E_CANTREVIVE();
/** Minor error codes - Free space errors - Can't shrink container */
public static final long H5E_CANTSHRINK = H5E_CANTSHRINK();
/** Minor error codes - Dataspace errors - Can't select hyperslab */
public static final long H5E_CANTSELECT = H5E_CANTSELECT();
/** Minor error codes - Cache related errors - Unable to serialize data from cache */
public static final long H5E_CANTSERIALIZE = H5E_CANTSERIALIZE();
/** Minor error codes - Property list errors - Can't set value */
public static final long H5E_CANTSET = H5E_CANTSET();
/** Minor error codes - Link related errors - Can't sort objects */
public static final long H5E_CANTSORT = H5E_CANTSORT();
/** Minor error codes - B-tree related errors - Unable to split node */
public static final long H5E_CANTSPLIT = H5E_CANTSPLIT();
/** Minor error codes - B-tree related errors - Unable to swap records */
public static final long H5E_CANTSWAP = H5E_CANTSWAP();
/** Minor error codes - Cache related errors - Unable to tag metadata in the cache */
public static final long H5E_CANTTAG = H5E_CANTTAG();
/** Minor error codes - Cache related errors - Unable to uncork an object */
public static final long H5E_CANTUNCORK = H5E_CANTUNCORK();
/** Minor error codes - Cache related errors - Unable to destroy a flush dependency */
public static final long H5E_CANTUNDEPEND = H5E_CANTUNDEPEND();
/** Minor error codes - Resource errors - Unable to unlock object */
public static final long H5E_CANTUNLOCK = H5E_CANTUNLOCK();
/** Minor error codes - File accessibility errors Unable to unlock file */
public static final long H5E_CANTUNLOCKFILE = H5E_CANTUNLOCKFILE();
/** Minor error codes - Cache related errors - Unable to un-pin cache entry */
public static final long H5E_CANTUNPIN = H5E_CANTUNPIN();
/** Minor error codes - Cache related errors - Unable to unprotect metadata */
public static final long H5E_CANTUNPROTECT = H5E_CANTUNPROTECT();
/** Minor error codes - Cache related errors - Unable to mark metadata as unserialized */
public static final long H5E_CANTUNSERIALIZE = H5E_CANTUNSERIALIZE();
/** Minor error codes - Heap errors - Can't update object */
public static final long H5E_CANTUPDATE = H5E_CANTUPDATE();
/** Generic low-level file I/O errors - Close failed */
public static final long H5E_CLOSEERROR = H5E_CLOSEERROR();
/** Minor error codes - Group related errors - Name component is too long */
public static final long H5E_COMPLEN = H5E_COMPLEN();
/** Major error codes - API Context */
public static final long H5E_CONTEXT = H5E_CONTEXT();
/** Major error codes - Dataset */
public static final long H5E_DATASET = H5E_DATASET();
/** Major error codes - Dataspace */
public static final long H5E_DATASPACE = H5E_DATASPACE();
/** Major error codes - Datatype */
public static final long H5E_DATATYPE = H5E_DATATYPE();
/** Value for the default error stack */
public static final long H5E_DEFAULT = H5E_DEFAULT();
/** Minor error codes - Property list errors - Duplicate class name in parent class */
public static final long H5E_DUPCLASS = H5E_DUPCLASS();
/** Major error codes - Extensible Array */
public static final long H5E_EARRAY = H5E_EARRAY();
/** Major error codes - External file list */
public static final long H5E_EFL = H5E_EFL();
/** Major error codes - Error API */
public static final long H5E_ERROR = H5E_ERROR();
/** Minor error codes - B-tree related errors - Object already exists */
public static final long H5E_EXISTS = H5E_EXISTS();
/** Major error codes - Fixed Array */
public static final long H5E_FARRAY = H5E_FARRAY();
/** Generic low-level file I/O errors - File control (fcntl) failed */
public static final long H5E_FCNTL = H5E_FCNTL();
/** Major error codes - File accessibility */
public static final long H5E_FILE = H5E_FILE();
/** Minor error codes - File accessibility errors - File already exists */
public static final long H5E_FILEEXISTS = H5E_FILEEXISTS();
/** Minor error codes - File accessibility errors - File already open */
public static final long H5E_FILEOPEN = H5E_FILEOPEN();
/** Major error codes - Free Space Manager */
public static final long H5E_FSPACE = H5E_FSPACE();
/** Major error codes - Function entry/exit */
public static final long H5E_FUNC = H5E_FUNC();
/** Major error codes - Heap */
public static final long H5E_HEAP = H5E_HEAP();
/** Minor error codes - Dataspace errors - Internal states are inconsistent */
public static final long H5E_INCONSISTENTSTATE = H5E_INCONSISTENTSTATE();
/** Major error codes - Internal error (too specific to document in detail) */
public static final long H5E_INTERNAL = H5E_INTERNAL();
/** Major error codes - Low-level I/O */
public static final long H5E_IO = H5E_IO();
/** Major error codes - Links */
public static final long H5E_LINK = H5E_LINK();
/** Minor error codes - Object header related errors - Bad object header link count */
public static final long H5E_LINKCOUNT = H5E_LINKCOUNT();
/** Minor error codes - Cache related errors - Failure in the cache logging framework */
public static final long H5E_LOGGING = H5E_LOGGING();
/** Major error codes - Map */
public static final long H5E_MAP = H5E_MAP();
/** Minor error codes - File accessibility errors - File mount error */
public static final long H5E_MOUNT = H5E_MOUNT();
/** Minor error codes - Parallel MPI - Some MPI function failed */
public static final long H5E_MPI = H5E_MPI();
/** Minor error codes - Parallel MPI - MPI Error String */
public static final long H5E_MPIERRSTR = H5E_MPIERRSTR();
/** Minor error codes - Link related errors - Too many soft links in path */
public static final long H5E_NLINKS = H5E_NLINKS();
/** Minor error codes - Parallel MPI - Can't perform independent IO */
public static final long H5E_NO_INDEPENDENT = H5E_NO_INDEPENDENT();
/** I/O pipeline errors - Filter present but encoding disabled */
public static final long H5E_NOENCODER = H5E_NOENCODER();
/** I/O pipeline errors - Requested filter is not available */
public static final long H5E_NOFILTER = H5E_NOFILTER();
/** Minor error codes - Object ID related errors - Out of IDs for group */
public static final long H5E_NOIDS = H5E_NOIDS();
/** Major error codes - No error */
public static final long H5E_NONE_MAJOR = H5E_NONE_MAJOR();
/** No error */
public static final long H5E_NONE_MINOR = H5E_NONE_MINOR();
/** Minor error codes - Resource errors - No space available for allocation */
public static final long H5E_NOSPACE = H5E_NOSPACE();
/** Minor error codes - Cache related errors - Metadata not currently cached */
public static final long H5E_NOTCACHED = H5E_NOTCACHED();
/** Minor error codes - B-tree related errors - Object not found */
public static final long H5E_NOTFOUND = H5E_NOTFOUND();
/** Minor error codes - File accessibility errors - Not an HDF5 file */
public static final long H5E_NOTHDF5 = H5E_NOTHDF5();
/** Minor error codes - Link related errors - Link class not registered */
public static final long H5E_NOTREGISTERED = H5E_NOTREGISTERED();
/** Minor error codes - Resource errors - Object is already open */
public static final long H5E_OBJOPEN = H5E_OBJOPEN();
/** Major error codes - Object header */
public static final long H5E_OHDR = H5E_OHDR();
/** Minor error codes - Plugin errors - Can't open directory or file */
public static final long H5E_OPENERROR = H5E_OPENERROR();
/** Generic low-level file I/O errors - Address overflowed */
public static final long H5E_OVERFLOW = H5E_OVERFLOW();
/** Major error codes - Page Buffering */
public static final long H5E_PAGEBUF = H5E_PAGEBUF();
/** Minor error codes - Group related errors - Problem with path to object */
public static final long H5E_PATH = H5E_PATH();
/** Major error codes - Data filters */
public static final long H5E_PLINE = H5E_PLINE();
/** Major error codes - Property lists */
public static final long H5E_PLIST = H5E_PLIST();
/** Major error codes - Plugin for dynamically loaded library */
public static final long H5E_PLUGIN = H5E_PLUGIN();
/** Minor error codes - Cache related errors - Protected metadata error */
public static final long H5E_PROTECT = H5E_PROTECT();
/** Generic low-level file I/O errors - Read failed */
public static final long H5E_READERROR = H5E_READERROR();
/** Major error codes - References */
public static final long H5E_REFERENCE = H5E_REFERENCE();
/** Major error codes - Resource unavailable */
public static final long H5E_RESOURCE = H5E_RESOURCE();
/** Major error codes - Reference Counted Strings */
public static final long H5E_RS = H5E_RS();
/** Generic low-level file I/O errors - Seek failed */
public static final long H5E_SEEKERROR = H5E_SEEKERROR();
/** Minor error codes - Property list errors - Disallowed operation */
public static final long H5E_SETDISALLOWED = H5E_SETDISALLOWED();
/** I/O pipeline errors - Error from filter 'set local' callback */
public static final long H5E_SETLOCAL = H5E_SETLOCAL();
/** Major error codes - Skip Lists */
public static final long H5E_SLIST = H5E_SLIST();
/** Major error codes - Shared Object Header Messages */
public static final long H5E_SOHM = H5E_SOHM();
/** Major error codes - Data storage */
public static final long H5E_STORAGE = H5E_STORAGE();
/** Major error codes - Symbol table */
public static final long H5E_SYM = H5E_SYM();
/** Minor error codes - System level errors - System error message */
public static final long H5E_SYSERRSTR = H5E_SYSERRSTR();
/** Minor error codes - Cache related errors - Internal error detected */
public static final long H5E_SYSTEM = H5E_SYSTEM();
/** Minor error codes - Link related errors - Link traversal failure */
public static final long H5E_TRAVERSE = H5E_TRAVERSE();
/** Minor error codes - File accessibility errors - File has been truncated */
public static final long H5E_TRUNCATED = H5E_TRUNCATED();
/** Major error codes - Ternary Search Trees */
public static final long H5E_TST = H5E_TST();
/** Minor error codes - Argument errors - Information is uinitialized */
public static final long H5E_UNINITIALIZED = H5E_UNINITIALIZED();
/** Minor error codes - Argument errors - Feature is unsupported */
public static final long H5E_UNSUPPORTED = H5E_UNSUPPORTED();
/** Minor error codes - Object header related errors - Wrong version number */
public static final long H5E_VERSION = H5E_VERSION();
/** Major error codes - Virtual File Layer */
public static final long H5E_VFL = H5E_VFL();
/** Major error codes - Virtual Object Layer */
public static final long H5E_VOL = H5E_VOL();
/** Error stack traversal direction - begin at API function, end deep */
public static final long H5E_WALK_DOWNWARD = H5E_WALK_DOWNWARD();
/** Error stack traversal direction - begin deep, end at API function */
public static final long H5E_WALK_UPWARD = H5E_WALK_UPWARD();
/** Generic low-level file I/O errors - Write failed */
public static final long H5E_WRITEERROR = H5E_WRITEERROR();
/** */
private static final int H5ES_STATUS_IN_PROGRESS = H5ES_STATUS_IN_PROGRESS();
/** */
private static final int H5ES_STATUS_SUCCEED = H5ES_STATUS_SUCCEED();
/** */
private static final int H5ES_STATUS_FAIL = H5ES_STATUS_FAIL();
/** */
public static final int H5F_ACC_CREAT = H5F_ACC_CREAT();
/** */
public static final int H5F_ACC_EXCL = H5F_ACC_EXCL();
/** */
public static final int H5F_ACC_RDONLY = H5F_ACC_RDONLY();
/** */
public static final int H5F_ACC_RDWR = H5F_ACC_RDWR();
/** */
public static final int H5F_ACC_TRUNC = H5F_ACC_TRUNC();
/** */
public static final int H5F_ACC_DEFAULT = H5F_ACC_DEFAULT();
/** */
public static final int H5F_ACC_SWMR_READ = H5F_ACC_SWMR_READ();
/** */
public static final int H5F_ACC_SWMR_WRITE = H5F_ACC_SWMR_WRITE();
/** */
public static final int H5F_CLOSE_DEFAULT = H5F_CLOSE_DEFAULT();
/** */
public static final int H5F_CLOSE_SEMI = H5F_CLOSE_SEMI();
/** */
public static final int H5F_CLOSE_STRONG = H5F_CLOSE_STRONG();
/** */
public static final int H5F_CLOSE_WEAK = H5F_CLOSE_WEAK();
/** */
public static final int H5F_LIBVER_ERROR = H5F_LIBVER_ERROR();
/** */
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_V114 = H5F_LIBVER_V114();
/** */
public static final int H5F_LIBVER_V200 = H5F_LIBVER_V200();
/** */
public static final int H5F_LIBVER_LATEST = H5F_LIBVER_LATEST();
/** */
public static final int H5F_LIBVER_NBOUNDS = H5F_LIBVER_NBOUNDS();
/** */
public static final int H5F_OBJ_ALL = H5F_OBJ_ALL();
/** */
public static final int H5F_OBJ_ATTR = H5F_OBJ_ATTR();
/** */
public static final int H5F_OBJ_DATASET = H5F_OBJ_DATASET();
/** */
public static final int H5F_OBJ_DATATYPE = H5F_OBJ_DATATYPE();
/** */
public static final int H5F_OBJ_FILE = H5F_OBJ_FILE();
/** */
public static final int H5F_OBJ_GROUP = H5F_OBJ_GROUP();
/** */
public static final int H5F_OBJ_LOCAL = H5F_OBJ_LOCAL();
/** */
public static final int H5F_SCOPE_GLOBAL = H5F_SCOPE_GLOBAL();
/** */
public static final int H5F_SCOPE_LOCAL = H5F_SCOPE_LOCAL();
/** */
public static final int H5F_UNLIMITED = H5F_UNLIMITED();
/** */
public static final int H5F_FSPACE_STRATEGY_FSM_AGGR = H5F_FSPACE_STRATEGY_FSM_AGGR();
/** */
public static final int H5F_FSPACE_STRATEGY_AGGR = H5F_FSPACE_STRATEGY_AGGR();
/** */
public static final int H5F_FSPACE_STRATEGY_PAGE = H5F_FSPACE_STRATEGY_PAGE();
/** */
public static final int H5F_FSPACE_STRATEGY_NONE = H5F_FSPACE_STRATEGY_NONE();
/** */
public static final int H5F_FSPACE_STRATEGY_NTYPES = H5F_FSPACE_STRATEGY_NTYPES();
/** */
public static final long H5FD_CORE = H5FD_CORE();
/** */
public static final long H5FD_DIRECT = H5FD_DIRECT();
/** */
public static final long H5FD_FAMILY = H5FD_FAMILY();
/** */
public static final long H5FD_LOG = H5FD_LOG();
/** */
public static final long H5FD_MPIO = H5FD_MPIO();
/** */
public static final long H5FD_MULTI = H5FD_MULTI();
/** */
public static final long H5FD_SEC2 = H5FD_SEC2();
/** */
public static final long H5FD_STDIO = H5FD_STDIO();
/** */
public static final long H5FD_WINDOWS = H5FD_WINDOWS();
/** */
public static final long H5FD_ROS3 = H5FD_ROS3();
/** */
public static final long H5FD_HDFS = H5FD_HDFS();
/** */
public static final int H5FD_LOG_LOC_READ = H5FD_LOG_LOC_READ();
/** */
public static final int H5FD_LOG_LOC_WRITE = H5FD_LOG_LOC_WRITE();
/** */
public static final int H5FD_LOG_LOC_SEEK = H5FD_LOG_LOC_SEEK();
/** */
public static final int H5FD_LOG_LOC_IO = H5FD_LOG_LOC_IO();
/** */
public static final int H5FD_LOG_FILE_READ = H5FD_LOG_FILE_READ();
/** */
public static final int H5FD_LOG_FILE_WRITE = H5FD_LOG_FILE_WRITE();
/** */
public static final int H5FD_LOG_FILE_IO = H5FD_LOG_FILE_IO();
/** */
public static final int H5FD_LOG_FLAVOR = H5FD_LOG_FLAVOR();
/** */
public static final int H5FD_LOG_NUM_READ = H5FD_LOG_NUM_READ();
/** */
public static final int H5FD_LOG_NUM_WRITE = H5FD_LOG_NUM_WRITE();
/** */
public static final int H5FD_LOG_NUM_SEEK = H5FD_LOG_NUM_SEEK();
/** */
public static final int H5FD_LOG_NUM_TRUNCATE = H5FD_LOG_NUM_TRUNCATE();
/** */
public static final int H5FD_LOG_NUM_IO = H5FD_LOG_NUM_IO();
/** */
public static final int H5FD_LOG_TIME_OPEN = H5FD_LOG_TIME_OPEN();
/** */
public static final int H5FD_LOG_TIME_STAT = H5FD_LOG_TIME_STAT();
/** */
public static final int H5FD_LOG_TIME_READ = H5FD_LOG_TIME_READ();
/** */
public static final int H5FD_LOG_TIME_WRITE = H5FD_LOG_TIME_WRITE();
/** */
public static final int H5FD_LOG_TIME_SEEK = H5FD_LOG_TIME_SEEK();
/** */
public static final int H5FD_LOG_TIME_CLOSE = H5FD_LOG_TIME_CLOSE();
/** */
public static final int H5FD_LOG_TIME_IO = H5FD_LOG_TIME_IO();
/** */
public static final int H5FD_LOG_ALLOC = H5FD_LOG_ALLOC();
/** */
public static final int H5FD_LOG_ALL = H5FD_LOG_ALL();
/** */
public static final int H5FD_MEM_NOLIST = H5FD_MEM_NOLIST();
/** */
public static final int H5FD_MEM_DEFAULT = H5FD_MEM_DEFAULT();
/** */
public static final int H5FD_MEM_SUPER = H5FD_MEM_SUPER();
/** */
public static final int H5FD_MEM_BTREE = H5FD_MEM_BTREE();
/** */
public static final int H5FD_MEM_DRAW = H5FD_MEM_DRAW();
/** */
public static final int H5FD_MEM_GHEAP = H5FD_MEM_GHEAP();
/** */
public static final int H5FD_MEM_LHEAP = H5FD_MEM_LHEAP();
/** */
public static final int H5FD_MEM_OHDR = H5FD_MEM_OHDR();
/** */
public static final int H5FD_MEM_NTYPES = H5FD_MEM_NTYPES();
/** */
public static final long H5FD_DEFAULT_HADDR_SIZE = H5FD_DEFAULT_HADDR_SIZE();
/** */
public static final long H5FD_MEM_DEFAULT_SIZE = H5FD_MEM_DEFAULT_SIZE();
/** */
public static final long H5FD_MEM_DEFAULT_SUPER_SIZE = H5FD_MEM_DEFAULT_SUPER_SIZE();
/** */
public static final long H5FD_MEM_DEFAULT_BTREE_SIZE = H5FD_MEM_DEFAULT_BTREE_SIZE();
/** */
public static final long H5FD_MEM_DEFAULT_DRAW_SIZE = H5FD_MEM_DEFAULT_DRAW_SIZE();
/** */
public static final long H5FD_MEM_DEFAULT_GHEAP_SIZE = H5FD_MEM_DEFAULT_GHEAP_SIZE();
/** */
public static final long H5FD_MEM_DEFAULT_LHEAP_SIZE = H5FD_MEM_DEFAULT_LHEAP_SIZE();
/** */
public static final long H5FD_MEM_DEFAULT_OHDR_SIZE = H5FD_MEM_DEFAULT_OHDR_SIZE();
// public static final int H5G_DATASET = H5G_DATASET();
// public static final int H5G_GROUP = H5G_GROUP();
// public static final int H5G_LINK = H5G_LINK();
// public static final int H5G_UDLINK = H5G_UDLINK();
// public static final int H5G_LINK_ERROR = H5G_LINK_ERROR();
// public static final int H5G_LINK_HARD = H5G_LINK_HARD();
// public static final int H5G_LINK_SOFT = H5G_LINK_SOFT();
// public static final int H5G_NLIBTYPES = H5G_NLIBTYPES();
// public static final int H5G_NTYPES = H5G_NTYPES();
// public static final int H5G_NUSERTYPES = H5G_NUSERTYPES();
// public static final int H5G_RESERVED_5 = H5G_RESERVED_5();
// public static final int H5G_RESERVED_6 = H5G_RESERVED_6();
// public static final int H5G_RESERVED_7 = H5G_RESERVED_7();
// public static final int H5G_SAME_LOC = H5G_SAME_LOC();
// public static final int H5G_TYPE = H5G_TYPE();
// public static final int H5G_UNKNOWN = H5G_UNKNOWN();
/** */
public static final int H5G_STORAGE_TYPE_UNKNOWN = H5G_STORAGE_TYPE_UNKNOWN();
/** */
public static final int H5G_STORAGE_TYPE_SYMBOL_TABLE = H5G_STORAGE_TYPE_SYMBOL_TABLE();
/** */
public static final int H5G_STORAGE_TYPE_COMPACT = H5G_STORAGE_TYPE_COMPACT();
/** */
public static final int H5G_STORAGE_TYPE_DENSE = H5G_STORAGE_TYPE_DENSE();
/** */
public static final int H5I_ATTR = H5I_ATTR();
/** */
public static final int H5I_BADID = H5I_BADID();
/** */
public static final int H5I_DATASET = H5I_DATASET();
/** */
public static final int H5I_DATASPACE = H5I_DATASPACE();
/** */
public static final int H5I_DATATYPE = H5I_DATATYPE();
/** */
public static final int H5I_ERROR_CLASS = H5I_ERROR_CLASS();
/** */
public static final int H5I_ERROR_MSG = H5I_ERROR_MSG();
/** */
public static final int H5I_ERROR_STACK = H5I_ERROR_STACK();
/** */
public static final int H5I_FILE = H5I_FILE();
/** */
public static final int H5I_GENPROP_CLS = H5I_GENPROP_CLS();
/** */
public static final int H5I_GENPROP_LST = H5I_GENPROP_LST();
/** */
public static final int H5I_GROUP = H5I_GROUP();
/** */
public static final int H5I_INVALID_HID = H5I_INVALID_HID();
/** */
public static final int H5I_NTYPES = H5I_NTYPES();
/** */
public static final int H5I_UNINIT = H5I_UNINIT();
/** */
public static final int H5I_VFL = H5I_VFL();
/** */
public static final int H5I_VOL = H5I_VOL();
/** */
public static final int H5L_TYPE_ERROR = H5L_TYPE_ERROR();
/** */
public static final int H5L_TYPE_HARD = H5L_TYPE_HARD();
/** */
public static final int H5L_TYPE_SOFT = H5L_TYPE_SOFT();
/** */
public static final int H5L_TYPE_EXTERNAL = H5L_TYPE_EXTERNAL();
/** */
public static final int H5L_TYPE_MAX = H5L_TYPE_MAX();
/** */
public static final int H5O_COPY_SHALLOW_HIERARCHY_FLAG = H5O_COPY_SHALLOW_HIERARCHY_FLAG();
/** */
public static final int H5O_COPY_EXPAND_SOFT_LINK_FLAG = H5O_COPY_EXPAND_SOFT_LINK_FLAG();
/** */
public static final int H5O_COPY_EXPAND_EXT_LINK_FLAG = H5O_COPY_EXPAND_EXT_LINK_FLAG();
/** */
public static final int H5O_COPY_EXPAND_REFERENCE_FLAG = H5O_COPY_EXPAND_REFERENCE_FLAG();
/** */
public static final int H5O_COPY_WITHOUT_ATTR_FLAG = H5O_COPY_WITHOUT_ATTR_FLAG();
/** */
public static final int H5O_COPY_PRESERVE_NULL_FLAG = H5O_COPY_PRESERVE_NULL_FLAG();
/** */
public static final int H5O_INFO_BASIC = H5O_INFO_BASIC();
/** */
public static final int H5O_INFO_TIME = H5O_INFO_TIME();
/** */
public static final int H5O_INFO_NUM_ATTRS = H5O_INFO_NUM_ATTRS();
/** */
public static final int H5O_INFO_ALL = H5O_INFO_ALL();
/** */
public static final int H5O_NATIVE_INFO_HDR = H5O_NATIVE_INFO_HDR();
/** */
public static final int H5O_NATIVE_INFO_META_SIZE = H5O_NATIVE_INFO_META_SIZE();
/** */
public static final int H5O_NATIVE_INFO_ALL = H5O_NATIVE_INFO_ALL();
/** */
public static final int H5O_SHMESG_NONE_FLAG = H5O_SHMESG_NONE_FLAG();
/** */
public static final int H5O_SHMESG_SDSPACE_FLAG = H5O_SHMESG_SDSPACE_FLAG();
/** */
public static final int H5O_SHMESG_DTYPE_FLAG = H5O_SHMESG_DTYPE_FLAG();
/** */
public static final int H5O_SHMESG_FILL_FLAG = H5O_SHMESG_FILL_FLAG();
/** */
public static final int H5O_SHMESG_PLINE_FLAG = H5O_SHMESG_PLINE_FLAG();
/** */
public static final int H5O_SHMESG_ATTR_FLAG = H5O_SHMESG_ATTR_FLAG();
/** */
public static final int H5O_SHMESG_ALL_FLAG = H5O_SHMESG_ALL_FLAG();
/** */
public static final int H5O_TYPE_UNKNOWN = H5O_TYPE_UNKNOWN();
/** */
public static final int H5O_TYPE_GROUP = H5O_TYPE_GROUP();
/** */
public static final int H5O_TYPE_DATASET = H5O_TYPE_DATASET();
/** */
public static final int H5O_TYPE_NAMED_DATATYPE = H5O_TYPE_NAMED_DATATYPE();
/** */
public static final int H5O_TYPE_NTYPES = H5O_TYPE_NTYPES();
/** */
public static final int H5O_MAX_TOKEN_SIZE = H5O_MAX_TOKEN_SIZE();
/** */
public static final H5O_token_t H5O_TOKEN_UNDEF = H5O_TOKEN_UNDEF();
/** */
public static final long H5P_ROOT = H5P_ROOT();
/** */
public static final long H5P_OBJECT_CREATE = H5P_OBJECT_CREATE();
/** */
public static final long H5P_FILE_CREATE = H5P_FILE_CREATE();
/** */
public static final long H5P_FILE_ACCESS = H5P_FILE_ACCESS();
/** */
public static final long H5P_DATASET_CREATE = H5P_DATASET_CREATE();
/** */
public static final long H5P_DATASET_ACCESS = H5P_DATASET_ACCESS();
/** */
public static final long H5P_DATASET_XFER = H5P_DATASET_XFER();
/** */
public static final long H5P_FILE_MOUNT = H5P_FILE_MOUNT();
/** */
public static final long H5P_GROUP_CREATE = H5P_GROUP_CREATE();
/** */
public static final long H5P_GROUP_ACCESS = H5P_GROUP_ACCESS();
/** */
public static final long H5P_DATATYPE_CREATE = H5P_DATATYPE_CREATE();
/** */
public static final long H5P_DATATYPE_ACCESS = H5P_DATATYPE_ACCESS();
/** */
public static final long H5P_STRING_CREATE = H5P_STRING_CREATE();
/** */
public static final long H5P_ATTRIBUTE_CREATE = H5P_ATTRIBUTE_CREATE();
/** */
public static final long H5P_ATTRIBUTE_ACCESS = H5P_ATTRIBUTE_ACCESS();
/** */
public static final long H5P_OBJECT_COPY = H5P_OBJECT_COPY();
/** */
public static final long H5P_LINK_CREATE = H5P_LINK_CREATE();
/** */
public static final long H5P_LINK_ACCESS = H5P_LINK_ACCESS();
/** */
public static final long H5P_VOL_INITIALIZE = H5P_VOL_INITIALIZE();
/** */
public static final long H5P_FILE_CREATE_DEFAULT = H5P_FILE_CREATE_DEFAULT();
/** */
public static final long H5P_FILE_ACCESS_DEFAULT = H5P_FILE_ACCESS_DEFAULT();
/** */
public static final long H5P_DATASET_CREATE_DEFAULT = H5P_DATASET_CREATE_DEFAULT();
/** */
public static final long H5P_DATASET_ACCESS_DEFAULT = H5P_DATASET_ACCESS_DEFAULT();
/** */
public static final long H5P_DATASET_XFER_DEFAULT = H5P_DATASET_XFER_DEFAULT();
/** */
public static final long H5P_FILE_MOUNT_DEFAULT = H5P_FILE_MOUNT_DEFAULT();
/** */
public static final long H5P_GROUP_CREATE_DEFAULT = H5P_GROUP_CREATE_DEFAULT();
/** */
public static final long H5P_GROUP_ACCESS_DEFAULT = H5P_GROUP_ACCESS_DEFAULT();
/** */
public static final long H5P_DATATYPE_CREATE_DEFAULT = H5P_DATATYPE_CREATE_DEFAULT();
/** */
public static final long H5P_DATATYPE_ACCESS_DEFAULT = H5P_DATATYPE_ACCESS_DEFAULT();
/** */
public static final long H5P_ATTRIBUTE_CREATE_DEFAULT = H5P_ATTRIBUTE_CREATE_DEFAULT();
/** */
public static final long H5P_ATTRIBUTE_ACCESS_DEFAULT = H5P_ATTRIBUTE_ACCESS_DEFAULT();
/** */
public static final long H5P_OBJECT_COPY_DEFAULT = H5P_OBJECT_COPY_DEFAULT();
/** */
public static final long H5P_LINK_CREATE_DEFAULT = H5P_LINK_CREATE_DEFAULT();
/** */
public static final long H5P_LINK_ACCESS_DEFAULT = H5P_LINK_ACCESS_DEFAULT();
/** */
public static final long H5P_VOL_INITIALIZE_DEFAULT = H5P_VOL_INITIALIZE_DEFAULT();
/** */
public static final int H5P_CRT_ORDER_TRACKED = H5P_CRT_ORDER_TRACKED();
/** */
public static final int H5P_CRT_ORDER_INDEXED = H5P_CRT_ORDER_INDEXED();
/** */
public static final long H5P_DEFAULT = H5P_DEFAULT();
/** */
public static final int H5PL_TYPE_ERROR = H5PL_TYPE_ERROR();
/** */
public static final int H5PL_TYPE_FILTER = H5PL_TYPE_FILTER();
/** */
public static final int H5PL_TYPE_VOL = H5PL_TYPE_VOL();
/** */
public static final int H5PL_TYPE_NONE = H5PL_TYPE_NONE();
/** */
public static final int H5PL_FILTER_PLUGIN = H5PL_FILTER_PLUGIN();
/** */
public static final int H5PL_VOL_PLUGIN = H5PL_VOL_PLUGIN();
/** */
public static final int H5PL_ALL_PLUGIN = H5PL_ALL_PLUGIN();
/** */
public static final int H5R_ATTR = H5R_ATTR();
/** */
public static final int H5R_BADTYPE = H5R_BADTYPE();
/** */
public static final int H5R_DATASET_REGION = H5R_DATASET_REGION();
/** */
public static final int H5R_DATASET_REGION1 = H5R_DATASET_REGION1();
/** */
public static final int H5R_DATASET_REGION2 = H5R_DATASET_REGION2();
/** */
public static final int H5R_MAXTYPE = H5R_MAXTYPE();
/** */
public static final int H5R_DSET_REG_REF_BUF_SIZE = H5R_DSET_REG_REF_BUF_SIZE();
/** */
public static final int H5R_OBJ_REF_BUF_SIZE = H5R_OBJ_REF_BUF_SIZE();
/** */
public static final int H5R_REF_BUF_SIZE = H5R_REF_BUF_SIZE();
/** */
public static final int H5R_OBJECT = H5R_OBJECT();
/** */
public static final int H5R_OBJECT1 = H5R_OBJECT1();
/** */
public static final int H5R_OBJECT2 = H5R_OBJECT2();
/** Define atomic datatypes */
public static final int H5S_ALL = H5S_ALL();
/** Define user-level maximum number of dimensions */
public static final int H5S_MAX_RANK = H5S_MAX_RANK();
/** Different types of dataspaces - error */
public static final int H5S_NO_CLASS = H5S_NO_CLASS();
/** Different types of dataspaces - null dataspace */
public static final int H5S_NULL = H5S_NULL();
/** Different types of dataspaces - scalar variable */
public static final int H5S_SCALAR = H5S_SCALAR();
/** Enumerated type for the type of selection - Entire extent selected */
public static final int H5S_SEL_ALL = H5S_SEL_ALL();
/** Enumerated type for the type of selection - Error */
public static final int H5S_SEL_ERROR = H5S_SEL_ERROR();
/** Enumerated type for the type of selection - Hyperslab selected */
public static final int H5S_SEL_HYPERSLABS = H5S_SEL_HYPERSLABS();
/** Enumerated type for the type of selection - LAST */
public static final int H5S_SEL_N = H5S_SEL_N();
/** Enumerated type for the type of selection - Nothing selected */
public static final int H5S_SEL_NONE = H5S_SEL_NONE();
/** Enumerated type for the type of selection - Points / elements selected */
public static final int H5S_SEL_POINTS = H5S_SEL_POINTS();
/** Different ways of combining selections - Binary "and" operation for hyperslabs */
public static final int H5S_SELECT_AND = H5S_SELECT_AND();
/** Different ways of combining selections - Append elements to end of point selection */
public static final int H5S_SELECT_APPEND = H5S_SELECT_APPEND();
/** Different ways of combining selections - Invalid upper bound on selection operations */
public static final int H5S_SELECT_INVALID = H5S_SELECT_INVALID();
/** Different ways of combining selections - error */
public static final int H5S_SELECT_NOOP = H5S_SELECT_NOOP();
/** Different ways of combining selections - Binary "not" operation for hyperslabs */
public static final int H5S_SELECT_NOTA = H5S_SELECT_NOTA();
/** Different ways of combining selections - Binary "not" operation for hyperslabs */
public static final int H5S_SELECT_NOTB = H5S_SELECT_NOTB();
/** Different ways of combining selections - Binary "or" operation for hyperslabs */
public static final int H5S_SELECT_OR = H5S_SELECT_OR();
/** Different ways of combining selections - Prepend elements to beginning of point selection */
public static final int H5S_SELECT_PREPEND = H5S_SELECT_PREPEND();
/** Different ways of combining selections - Select "set" operation */
public static final int H5S_SELECT_SET = H5S_SELECT_SET();
/** Different ways of combining selections - Binary "xor" operation for hyperslabs */
public static final int H5S_SELECT_XOR = H5S_SELECT_XOR();
/** Different types of dataspaces - simple dataspace */
public static final int H5S_SIMPLE = H5S_SIMPLE();
/** Define atomic datatypes */
public static final int H5S_UNLIMITED = H5S_UNLIMITED();
/** */
public static final long H5T_ALPHA_B16 = H5T_ALPHA_B16();
/** */
public static final long H5T_ALPHA_B32 = H5T_ALPHA_B32();
/** */
public static final long H5T_ALPHA_B64 = H5T_ALPHA_B64();
/** */
public static final long H5T_ALPHA_B8 = H5T_ALPHA_B8();
/** */
public static final long H5T_ALPHA_F32 = H5T_ALPHA_F32();
/** */
public static final long H5T_ALPHA_F64 = H5T_ALPHA_F64();
/** */
public static final long H5T_ALPHA_I16 = H5T_ALPHA_I16();
/** */
public static final long H5T_ALPHA_I32 = H5T_ALPHA_I32();
/** */
public static final long H5T_ALPHA_I64 = H5T_ALPHA_I64();
/** */
public static final long H5T_ALPHA_I8 = H5T_ALPHA_I8();
/** */
public static final long H5T_ALPHA_U16 = H5T_ALPHA_U16();
/** */
public static final long H5T_ALPHA_U32 = H5T_ALPHA_U32();
/** */
public static final long H5T_ALPHA_U64 = H5T_ALPHA_U64();
/** */
public static final long H5T_ALPHA_U8 = H5T_ALPHA_U8();
/** */
public static final int H5T_ARRAY = H5T_ARRAY();
/** */
public static final int H5T_BITFIELD = H5T_BITFIELD();
/** */
public static final int H5T_BKG_NO = H5T_BKG_NO();
/** */
public static final int H5T_BKG_YES = H5T_BKG_YES();
/** */
public static final long H5T_C_S1 = H5T_C_S1();
/** */
public static final int H5T_COMPLEX = H5T_COMPLEX();
/** */
public static final int H5T_COMPOUND = H5T_COMPOUND();
/** */
public static final int H5T_CONV_CONV = H5T_CONV_CONV();
/** */
public static final int H5T_CONV_FREE = H5T_CONV_FREE();
/** */
public static final int H5T_CONV_INIT = H5T_CONV_INIT();
/** */
public static final long H5T_COMPLEX_IEEE_F16BE = H5T_COMPLEX_IEEE_F16BE();
/** */
public static final long H5T_COMPLEX_IEEE_F16LE = H5T_COMPLEX_IEEE_F16LE();
/** */
public static final long H5T_COMPLEX_IEEE_F32BE = H5T_COMPLEX_IEEE_F32BE();
/** */
public static final long H5T_COMPLEX_IEEE_F32LE = H5T_COMPLEX_IEEE_F32LE();
/** */
public static final long H5T_COMPLEX_IEEE_F64BE = H5T_COMPLEX_IEEE_F64BE();
/** */
public static final long H5T_COMPLEX_IEEE_F64LE = H5T_COMPLEX_IEEE_F64LE();
/** */
public static final int H5T_CSET_ERROR = H5T_CSET_ERROR();
/** */
public static final int H5T_CSET_ASCII = H5T_CSET_ASCII();
/** */
public static final int H5T_CSET_UTF8 = H5T_CSET_UTF8();
/** */
public static final int H5T_CSET_RESERVED_10 = H5T_CSET_RESERVED_10();
/** */
public static final int H5T_CSET_RESERVED_11 = H5T_CSET_RESERVED_11();
/** */
public static final int H5T_CSET_RESERVED_12 = H5T_CSET_RESERVED_12();
/** */
public static final int H5T_CSET_RESERVED_13 = H5T_CSET_RESERVED_13();
/** */
public static final int H5T_CSET_RESERVED_14 = H5T_CSET_RESERVED_14();
/** */
public static final int H5T_CSET_RESERVED_15 = H5T_CSET_RESERVED_15();
/** */
public static final int H5T_CSET_RESERVED_2 = H5T_CSET_RESERVED_2();
/** */
public static final int H5T_CSET_RESERVED_3 = H5T_CSET_RESERVED_3();
/** */
public static final int H5T_CSET_RESERVED_4 = H5T_CSET_RESERVED_4();
/** */
public static final int H5T_CSET_RESERVED_5 = H5T_CSET_RESERVED_5();
/** */
public static final int H5T_CSET_RESERVED_6 = H5T_CSET_RESERVED_6();
/** */
public static final int H5T_CSET_RESERVED_7 = H5T_CSET_RESERVED_7();
/** */
public static final int H5T_CSET_RESERVED_8 = H5T_CSET_RESERVED_8();
/** */
public static final int H5T_CSET_RESERVED_9 = H5T_CSET_RESERVED_9();
/** */
public static final int H5T_DIR_ASCEND = H5T_DIR_ASCEND();
/** */
public static final int H5T_DIR_DEFAULT = H5T_DIR_DEFAULT();
/** */
public static final int H5T_DIR_DESCEND = H5T_DIR_DESCEND();
/** */
public static final int H5T_ENUM = H5T_ENUM();
/** */
public static final int H5T_FLOAT = H5T_FLOAT();
/** */
public static final long H5T_FORTRAN_S1 = H5T_FORTRAN_S1();
/** */
public static final long H5T_IEEE_F16BE = H5T_IEEE_F16BE();
/** */
public static final long H5T_IEEE_F16LE = H5T_IEEE_F16LE();
/** */
public static final long H5T_IEEE_F32BE = H5T_IEEE_F32BE();
/** */
public static final long H5T_IEEE_F32LE = H5T_IEEE_F32LE();
/** */
public static final long H5T_IEEE_F64BE = H5T_IEEE_F64BE();
/** */
public static final long H5T_IEEE_F64LE = H5T_IEEE_F64LE();
/** */
public static final long H5T_FLOAT_BFLOAT16BE = H5T_FLOAT_BFLOAT16BE();
/** */
public static final long H5T_FLOAT_BFLOAT16LE = H5T_FLOAT_BFLOAT16LE();
/** */
public static final long H5T_FLOAT_F8E4M3 = H5T_FLOAT_F8E4M3();
/** */
public static final long H5T_FLOAT_F8E5M2 = H5T_FLOAT_F8E5M2();
/** */
public static final int H5T_INTEGER = H5T_INTEGER();
/** */
public static final long H5T_INTEL_B16 = H5T_INTEL_B16();
/** */
public static final long H5T_INTEL_B32 = H5T_INTEL_B32();
/** */
public static final long H5T_INTEL_B64 = H5T_INTEL_B64();
/** */
public static final long H5T_INTEL_B8 = H5T_INTEL_B8();
/** */
public static final long H5T_INTEL_F32 = H5T_INTEL_F32();
/** */
public static final long H5T_INTEL_F64 = H5T_INTEL_F64();
/** */
public static final long H5T_INTEL_I16 = H5T_INTEL_I16();
/** */
public static final long H5T_INTEL_I32 = H5T_INTEL_I32();
/** */
public static final long H5T_INTEL_I64 = H5T_INTEL_I64();
/** */
public static final long H5T_INTEL_I8 = H5T_INTEL_I8();
/** */
public static final long H5T_INTEL_U16 = H5T_INTEL_U16();
/** */
public static final long H5T_INTEL_U32 = H5T_INTEL_U32();
/** */
public static final long H5T_INTEL_U64 = H5T_INTEL_U64();
/** */
public static final long H5T_INTEL_U8 = H5T_INTEL_U8();
/** */
public static final long H5T_MIPS_B16 = H5T_MIPS_B16();
/** */
public static final long H5T_MIPS_B32 = H5T_MIPS_B32();
/** */
public static final long H5T_MIPS_B64 = H5T_MIPS_B64();
/** */
public static final long H5T_MIPS_B8 = H5T_MIPS_B8();
/** */
public static final long H5T_MIPS_F32 = H5T_MIPS_F32();
/** */
public static final long H5T_MIPS_F64 = H5T_MIPS_F64();
/** */
public static final long H5T_MIPS_I16 = H5T_MIPS_I16();
/** */
public static final long H5T_MIPS_I32 = H5T_MIPS_I32();
/** */
public static final long H5T_MIPS_I64 = H5T_MIPS_I64();
/** */
public static final long H5T_MIPS_I8 = H5T_MIPS_I8();
/** */
public static final long H5T_MIPS_U16 = H5T_MIPS_U16();
/** */
public static final long H5T_MIPS_U32 = H5T_MIPS_U32();
/** */
public static final long H5T_MIPS_U64 = H5T_MIPS_U64();
/** */
public static final long H5T_MIPS_U8 = H5T_MIPS_U8();
/** */
public static final long H5T_NATIVE_B16 = H5T_NATIVE_B16();
/** */
public static final long H5T_NATIVE_B32 = H5T_NATIVE_B32();
/** */
public static final long H5T_NATIVE_B64 = H5T_NATIVE_B64();
/** */
public static final long H5T_NATIVE_B8 = H5T_NATIVE_B8();
/** */
public static final long H5T_NATIVE_CHAR = H5T_NATIVE_CHAR();
/** */
public static final long H5T_NATIVE_DOUBLE = H5T_NATIVE_DOUBLE();
/** */
public static final long H5T_NATIVE_DOUBLE_COMPLEX = H5T_NATIVE_DOUBLE_COMPLEX();
/** */
public static final long H5T_NATIVE_FLOAT = H5T_NATIVE_FLOAT();
/** */
public static final long H5T_NATIVE_FLOAT16 = H5T_NATIVE_FLOAT16();
/** */
public static final long H5T_NATIVE_FLOAT_COMPLEX = H5T_NATIVE_FLOAT_COMPLEX();
/** */
public static final long H5T_NATIVE_HADDR = H5T_NATIVE_HADDR();
/** */
public static final long H5T_NATIVE_HBOOL = H5T_NATIVE_HBOOL();
/** */
public static final long H5T_NATIVE_HERR = H5T_NATIVE_HERR();
/** */
public static final long H5T_NATIVE_HSIZE = H5T_NATIVE_HSIZE();
/** */
public static final long H5T_NATIVE_HSSIZE = H5T_NATIVE_HSSIZE();
/** */
public static final long H5T_NATIVE_INT = H5T_NATIVE_INT();
/** */
public static final long H5T_NATIVE_INT_FAST16 = H5T_NATIVE_INT_FAST16();
/** */
public static final long H5T_NATIVE_INT_FAST32 = H5T_NATIVE_INT_FAST32();
/** */
public static final long H5T_NATIVE_INT_FAST64 = H5T_NATIVE_INT_FAST64();
/** */
public static final long H5T_NATIVE_INT_FAST8 = H5T_NATIVE_INT_FAST8();
/** */
public static final long H5T_NATIVE_INT_LEAST16 = H5T_NATIVE_INT_LEAST16();
/** */
public static final long H5T_NATIVE_INT_LEAST32 = H5T_NATIVE_INT_LEAST32();
/** */
public static final long H5T_NATIVE_INT_LEAST64 = H5T_NATIVE_INT_LEAST64();
/** */
public static final long H5T_NATIVE_INT_LEAST8 = H5T_NATIVE_INT_LEAST8();
/** */
public static final long H5T_NATIVE_INT16 = H5T_NATIVE_INT16();
/** */
public static final long H5T_NATIVE_INT32 = H5T_NATIVE_INT32();
/** */
public static final long H5T_NATIVE_INT64 = H5T_NATIVE_INT64();
/** */
public static final long H5T_NATIVE_INT8 = H5T_NATIVE_INT8();
/** */
public static final long H5T_NATIVE_LDOUBLE = H5T_NATIVE_LDOUBLE();
/** */
public static final long H5T_NATIVE_LLONG = H5T_NATIVE_LLONG();
/** */
public static final long H5T_NATIVE_LONG = H5T_NATIVE_LONG();
/** */
public static final long H5T_NATIVE_LDOUBLE_COMPLEX = H5T_NATIVE_LDOUBLE_COMPLEX();
/** */
public static final long H5T_NATIVE_OPAQUE = H5T_NATIVE_OPAQUE();
/** */
public static final long H5T_NATIVE_SCHAR = H5T_NATIVE_SCHAR();
/** */
public static final long H5T_NATIVE_SHORT = H5T_NATIVE_SHORT();
/** */
public static final long H5T_NATIVE_UCHAR = H5T_NATIVE_UCHAR();
/** */
public static final long H5T_NATIVE_UINT = H5T_NATIVE_UINT();
/** */
public static final long H5T_NATIVE_UINT_FAST16 = H5T_NATIVE_UINT_FAST16();
/** */
public static final long H5T_NATIVE_UINT_FAST32 = H5T_NATIVE_UINT_FAST32();
/** */
public static final long H5T_NATIVE_UINT_FAST64 = H5T_NATIVE_UINT_FAST64();
/** */
public static final long H5T_NATIVE_UINT_FAST8 = H5T_NATIVE_UINT_FAST8();
/** */
public static final long H5T_NATIVE_UINT_LEAST16 = H5T_NATIVE_UINT_LEAST16();
/** */
public static final long H5T_NATIVE_UINT_LEAST32 = H5T_NATIVE_UINT_LEAST32();
/** */
public static final long H5T_NATIVE_UINT_LEAST64 = H5T_NATIVE_UINT_LEAST64();
/** */
public static final long H5T_NATIVE_UINT_LEAST8 = H5T_NATIVE_UINT_LEAST8();
/** */
public static final long H5T_NATIVE_UINT16 = H5T_NATIVE_UINT16();
/** */
public static final long H5T_NATIVE_UINT32 = H5T_NATIVE_UINT32();
/** */
public static final long H5T_NATIVE_UINT64 = H5T_NATIVE_UINT64();
/** */
public static final long H5T_NATIVE_UINT8 = H5T_NATIVE_UINT8();
/** */
public static final long H5T_NATIVE_ULLONG = H5T_NATIVE_ULLONG();
/** */
public static final long H5T_NATIVE_ULONG = H5T_NATIVE_ULONG();
/** */
public static final long H5T_NATIVE_USHORT = H5T_NATIVE_USHORT();
/** */
public static final int H5T_NCLASSES = H5T_NCLASSES();
/** */
public static final int H5T_NO_CLASS = H5T_NO_CLASS();
/** */
public static final int H5T_NORM_ERROR = H5T_NORM_ERROR();
/** */
public static final int H5T_NORM_IMPLIED = H5T_NORM_IMPLIED();
/** */
public static final int H5T_NORM_MSBSET = H5T_NORM_MSBSET();
/** */
public static final int H5T_NORM_NONE = H5T_NORM_NONE();
/** */
public static final int H5T_NPAD = H5T_NPAD();
/** */
public static final int H5T_NSGN = H5T_NSGN();
/** */
public static final int H5T_OPAQUE = H5T_OPAQUE();
/** */
public static final int H5T_OPAQUE_TAG_MAX = H5T_OPAQUE_TAG_MAX(); /* 1.6.5 */
/** */
public static final int H5T_ORDER_BE = H5T_ORDER_BE();
/** */
public static final int H5T_ORDER_ERROR = H5T_ORDER_ERROR();
/** */
public static final int H5T_ORDER_LE = H5T_ORDER_LE();
/** */
public static final int H5T_ORDER_NONE = H5T_ORDER_NONE();
/** */
public static final int H5T_ORDER_VAX = H5T_ORDER_VAX();
/** */
public static final int H5T_PAD_BACKGROUND = H5T_PAD_BACKGROUND();
/** */
public static final int H5T_PAD_ERROR = H5T_PAD_ERROR();
/** */
public static final int H5T_PAD_ONE = H5T_PAD_ONE();
/** */
public static final int H5T_PAD_ZERO = H5T_PAD_ZERO();
/** */
public static final int H5T_PERS_DONTCARE = H5T_PERS_DONTCARE();
/** */
public static final int H5T_PERS_HARD = H5T_PERS_HARD();
/** */
public static final int H5T_PERS_SOFT = H5T_PERS_SOFT();
/** */
public static final int H5T_REFERENCE = H5T_REFERENCE();
/** */
public static final int H5T_SGN_2 = H5T_SGN_2();
/** */
public static final int H5T_SGN_ERROR = H5T_SGN_ERROR();
/** */
public static final int H5T_SGN_NONE = H5T_SGN_NONE();
/** */
public static final long H5T_STD_B16BE = H5T_STD_B16BE();
/** */
public static final long H5T_STD_B16LE = H5T_STD_B16LE();
/** */
public static final long H5T_STD_B32BE = H5T_STD_B32BE();
/** */
public static final long H5T_STD_B32LE = H5T_STD_B32LE();
/** */
public static final long H5T_STD_B64BE = H5T_STD_B64BE();
/** */
public static final long H5T_STD_B64LE = H5T_STD_B64LE();
/** */
public static final long H5T_STD_B8BE = H5T_STD_B8BE();
/** */
public static final long H5T_STD_B8LE = H5T_STD_B8LE();
/** */
public static final long H5T_STD_I16BE = H5T_STD_I16BE();
/** */
public static final long H5T_STD_I16LE = H5T_STD_I16LE();
/** */
public static final long H5T_STD_I32BE = H5T_STD_I32BE();
/** */
public static final long H5T_STD_I32LE = H5T_STD_I32LE();
/** */
public static final long H5T_STD_I64BE = H5T_STD_I64BE();
/** */
public static final long H5T_STD_I64LE = H5T_STD_I64LE();
/** */
public static final long H5T_STD_I8BE = H5T_STD_I8BE();
/** */
public static final long H5T_STD_I8LE = H5T_STD_I8LE();
/** */
public static final long H5T_STD_REF_DSETREG = H5T_STD_REF_DSETREG();
/** */
public static final long H5T_STD_REF_OBJ = H5T_STD_REF_OBJ();
/** */
public static final long H5T_STD_REF = H5T_STD_REF();
/** */
public static final long H5T_STD_U16BE = H5T_STD_U16BE();
/** */
public static final long H5T_STD_U16LE = H5T_STD_U16LE();
/** */
public static final long H5T_STD_U32BE = H5T_STD_U32BE();
/** */
public static final long H5T_STD_U32LE = H5T_STD_U32LE();
/** */
public static final long H5T_STD_U64BE = H5T_STD_U64BE();
/** */
public static final long H5T_STD_U64LE = H5T_STD_U64LE();
/** */
public static final long H5T_STD_U8BE = H5T_STD_U8BE();
/** */
public static final long H5T_STD_U8LE = H5T_STD_U8LE();
/** */
public static final int H5T_STR_ERROR = H5T_STR_ERROR();
/** */
public static final int H5T_STR_NULLPAD = H5T_STR_NULLPAD();
/** */
public static final int H5T_STR_NULLTERM = H5T_STR_NULLTERM();
/** */
public static final int H5T_STR_RESERVED_10 = H5T_STR_RESERVED_10();
/** */
public static final int H5T_STR_RESERVED_11 = H5T_STR_RESERVED_11();
/** */
public static final int H5T_STR_RESERVED_12 = H5T_STR_RESERVED_12();
/** */
public static final int H5T_STR_RESERVED_13 = H5T_STR_RESERVED_13();
/** */
public static final int H5T_STR_RESERVED_14 = H5T_STR_RESERVED_14();
/** */
public static final int H5T_STR_RESERVED_15 = H5T_STR_RESERVED_15();
/** */
public static final int H5T_STR_RESERVED_3 = H5T_STR_RESERVED_3();
/** */
public static final int H5T_STR_RESERVED_4 = H5T_STR_RESERVED_4();
/** */
public static final int H5T_STR_RESERVED_5 = H5T_STR_RESERVED_5();
/** */
public static final int H5T_STR_RESERVED_6 = H5T_STR_RESERVED_6();
/** */
public static final int H5T_STR_RESERVED_7 = H5T_STR_RESERVED_7();
/** */
public static final int H5T_STR_RESERVED_8 = H5T_STR_RESERVED_8();
/** */
public static final int H5T_STR_RESERVED_9 = H5T_STR_RESERVED_9();
/** */
public static final int H5T_STR_SPACEPAD = H5T_STR_SPACEPAD();
/** */
public static final int H5T_STRING = H5T_STRING();
/** */
public static final int H5T_TIME = H5T_TIME();
/** */
public static final long H5T_UNIX_D32BE = H5T_UNIX_D32BE();
/** */
public static final long H5T_UNIX_D32LE = H5T_UNIX_D32LE();
/** */
public static final long H5T_UNIX_D64BE = H5T_UNIX_D64BE();
/** */
public static final long H5T_UNIX_D64LE = H5T_UNIX_D64LE();
/** */
public static final long H5T_VARIABLE = H5T_VARIABLE();
/** */
public static final int H5T_VLEN = H5T_VLEN();
/** */
public static final int H5T_VL_T = H5T_VL_T();
/** */
public static final int H5VL_CAP_FLAG_NONE = H5VL_CAP_FLAG_NONE();
/** */
public static final int H5VL_CAP_FLAG_THREADSAFE = H5VL_CAP_FLAG_THREADSAFE();
/** */
public static final long H5VL_NATIVE = H5VL_NATIVE();
/** */
public static final String H5VL_NATIVE_NAME = H5VL_NATIVE_NAME();
/** */
public static final int H5VL_NATIVE_VALUE = H5VL_NATIVE_VALUE();
/** */
public static final int H5VL_NATIVE_VERSION = H5VL_NATIVE_VERSION();
/** */
public static final int H5_VOL_INVALID = H5_VOL_INVALID();
/** */
public static final int H5_VOL_NATIVE = H5_VOL_NATIVE();
/** */
public static final int H5_VOL_RESERVED = H5_VOL_RESERVED();
/** */
public static final int H5_VOL_MAX = H5_VOL_MAX();
/** Return values for filter callback function */
public static final int H5Z_CB_CONT = H5Z_CB_CONT();
/** Return values for filter callback function */
public static final int H5Z_CB_ERROR = H5Z_CB_ERROR();
/** Return values for filter callback function */
public static final int H5Z_CB_FAIL = H5Z_CB_FAIL();
/** Return values for filter callback function */
public static final int H5Z_CB_NO = H5Z_CB_NO();
/** Values to decide if EDC is enabled for reading data */
public static final int H5Z_DISABLE_EDC = H5Z_DISABLE_EDC();
/** Values to decide if EDC is enabled for reading data */
public static final int H5Z_ENABLE_EDC = H5Z_ENABLE_EDC();
/** Values to decide if EDC is enabled for reading data */
public static final int H5Z_ERROR_EDC = H5Z_ERROR_EDC();
/** Filter IDs - deflation like gzip */
public static final int H5Z_FILTER_DEFLATE = H5Z_FILTER_DEFLATE();
/** Filter IDs - no filter */
public static final int H5Z_FILTER_ERROR = H5Z_FILTER_ERROR();
/** Filter IDs - fletcher32 checksum of EDC */
public static final int H5Z_FILTER_FLETCHER32 = H5Z_FILTER_FLETCHER32();
/** Filter IDs - maximum filter id */
public static final int H5Z_FILTER_MAX = H5Z_FILTER_MAX();
/** Filter IDs - nbit compression */
public static final int H5Z_FILTER_NBIT = H5Z_FILTER_NBIT();
/** Filter IDs - reserved indefinitely */
public static final int H5Z_FILTER_NONE = H5Z_FILTER_NONE();
/** Filter IDs - filter ids below this value are reserved for library use */
public static final int H5Z_FILTER_RESERVED = H5Z_FILTER_RESERVED();
/** Filter IDs - scale+offset compression */
public static final int H5Z_FILTER_SCALEOFFSET = H5Z_FILTER_SCALEOFFSET();
/** Filter IDs - shuffle the data */
public static final int H5Z_FILTER_SHUFFLE = H5Z_FILTER_SHUFFLE();
/** Filter IDs - szip compression */
public static final int H5Z_FILTER_SZIP = H5Z_FILTER_SZIP();
/**
* Flags for filter definition (stored)
* definition flag mask
*/
public static final int H5Z_FLAG_DEFMASK = H5Z_FLAG_DEFMASK();
/**
* Additional flags for filter invocation (not stored)
* invocation flag mask
*/
public static final int H5Z_FLAG_INVMASK = H5Z_FLAG_INVMASK();
/**
* Flags for filter definition (stored)
* filter is mandatory
*/
public static final int H5Z_FLAG_MANDATORY = H5Z_FLAG_MANDATORY();
/**
* Flags for filter definition (stored)
* filter is optional
*/
public static final int H5Z_FLAG_OPTIONAL = H5Z_FLAG_OPTIONAL();
/**
* Additional flags for filter invocation (not stored)
* reverse direction; read
*/
public static final int H5Z_FLAG_REVERSE = H5Z_FLAG_REVERSE();
/**
* Additional flags for filter invocation (not stored)
* skip EDC filters for read
*/
public static final int H5Z_FLAG_SKIP_EDC = H5Z_FLAG_SKIP_EDC();
/** Symbol to remove all filters in H5Premove_filter */
public static final int H5Z_FILTER_ALL = H5Z_FILTER_ALL();
/** Maximum number of filters allowed in a pipeline */
public static final int H5Z_MAX_NFILTERS = H5Z_MAX_NFILTERS();
/** Values to decide if EDC is enabled for reading data */
public static final int H5Z_NO_EDC = H5Z_NO_EDC();
/** Bit flags for H5Zget_filter_info */
public static final int H5Z_FILTER_CONFIG_ENCODE_ENABLED = H5Z_FILTER_CONFIG_ENCODE_ENABLED();
/** Bit flags for H5Zget_filter_info */
public static final int H5Z_FILTER_CONFIG_DECODE_ENABLED = H5Z_FILTER_CONFIG_DECODE_ENABLED();
/** Special parameters for ScaleOffset filter*/
public static final int H5Z_SO_INT_MINBITS_DEFAULT = H5Z_SO_INT_MINBITS_DEFAULT();
/** Special parameters for ScaleOffset filter*/
public static final int H5Z_SO_FLOAT_DSCALE = H5Z_SO_FLOAT_DSCALE();
/** Special parameters for ScaleOffset filter*/
public static final int H5Z_SO_FLOAT_ESCALE = H5Z_SO_FLOAT_ESCALE();
/** Special parameters for ScaleOffset filter*/
public static final int H5Z_SO_INT = H5Z_SO_INT();
/** shuffle filter - Number of parameters that users can set */
public static final int H5Z_SHUFFLE_USER_NPARMS = H5Z_SHUFFLE_USER_NPARMS();
/** shuffle filter - Total number of parameters for filter */
public static final int H5Z_SHUFFLE_TOTAL_NPARMS = H5Z_SHUFFLE_TOTAL_NPARMS();
/** szip filter - Number of parameters that users can set */
public static final int H5Z_SZIP_USER_NPARMS = H5Z_SZIP_USER_NPARMS();
/** szip filter - Total number of parameters for filter */
public static final int H5Z_SZIP_TOTAL_NPARMS = H5Z_SZIP_TOTAL_NPARMS();
/** szip filter - "User" parameter for option mask */
public static final int H5Z_SZIP_PARM_MASK = H5Z_SZIP_PARM_MASK();
/** szip filter - "User" parameter for pixels-per-block */
public static final int H5Z_SZIP_PARM_PPB = H5Z_SZIP_PARM_PPB();
/** szip filter - "Local" parameter for bits-per-pixel */
public static final int H5Z_SZIP_PARM_BPP = H5Z_SZIP_PARM_BPP();
/** szip filter - "Local" parameter for pixels-per-scanline */
public static final int H5Z_SZIP_PARM_PPS = H5Z_SZIP_PARM_PPS();
/** nbit filter - Number of parameters that users can set */
public static final int H5Z_NBIT_USER_NPARMS = H5Z_NBIT_USER_NPARMS();
/** scale offset filter - Number of parameters that users can set */
public static final int H5Z_SCALEOFFSET_USER_NPARMS = H5Z_SCALEOFFSET_USER_NPARMS();
// /////////////////////////////////////////////////////////////////////////
// List of private native variables to get constant values from C //
// DO NOT EDIT THE LIST UNLESS YOU KNOW WHAT YOU DO!!! //
// /////////////////////////////////////////////////////////////////////////
private static native final long H5_QUARTER_HADDR_MAX();
private static native final int H5_SZIP_MAX_PIXELS_PER_BLOCK();
private static native final int H5_SZIP_NN_OPTION_MASK();
private static native final int H5_SZIP_EC_OPTION_MASK();
private static native final int H5_SZIP_ALLOW_K13_OPTION_MASK();
private static native final int H5_SZIP_CHIP_OPTION_MASK();
private static native final int H5_INDEX_UNKNOWN();
private static native final int H5_INDEX_NAME();
private static native final int H5_INDEX_CRT_ORDER();
private static native final int H5_INDEX_N();
private static native final int H5_ITER_UNKNOWN();
private static native final int H5_ITER_INC();
private static native final int H5_ITER_DEC();
private static native final int H5_ITER_NATIVE();
private static native final int H5_ITER_N();
private static native final int H5AC_CURR_CACHE_CONFIG_VERSION();
private static native final int H5AC_MAX_TRACE_FILE_NAME_LEN();
private static native final int H5AC_METADATA_WRITE_STRATEGY_PROCESS_ZERO_ONLY();
private static native final int H5AC_METADATA_WRITE_STRATEGY_DISTRIBUTED();
private static native final int H5C_incr_off();
private static native final int H5C_incr_threshold();
private static native final int H5C_flash_incr_off();
private static native final int H5C_flash_incr_add_space();
private static native final int H5C_decr_off();
private static native final int H5C_decr_threshold();
private static native final int H5C_decr_age_out();
private static native final int H5C_decr_age_out_with_threshold();
private static native final int H5D_CHUNK_IDX_BTREE();
private static native final int H5D_ALLOC_TIME_DEFAULT();
private static native final int H5D_ALLOC_TIME_EARLY();
private static native final int H5D_ALLOC_TIME_ERROR();
private static native final int H5D_ALLOC_TIME_INCR();
private static native final int H5D_ALLOC_TIME_LATE();
private static native final int H5D_FILL_TIME_ERROR();
private static native final int H5D_FILL_TIME_ALLOC();
private static native final int H5D_FILL_TIME_NEVER();
private static native final int H5D_FILL_TIME_IFSET();
private static native final int H5D_FILL_VALUE_DEFAULT();
private static native final int H5D_FILL_VALUE_ERROR();
private static native final int H5D_FILL_VALUE_UNDEFINED();
private static native final int H5D_FILL_VALUE_USER_DEFINED();
private static native final int H5D_LAYOUT_ERROR();
private static native final int H5D_CHUNKED();
private static native final int H5D_COMPACT();
private static native final int H5D_CONTIGUOUS();
private static native final int H5D_VIRTUAL();
private static native final int H5D_NLAYOUTS();
private static native final int H5D_SPACE_STATUS_ALLOCATED();
private static native final int H5D_SPACE_STATUS_ERROR();
private static native final int H5D_SPACE_STATUS_NOT_ALLOCATED();
private static native final int H5D_SPACE_STATUS_PART_ALLOCATED();
private static native final int H5D_VDS_ERROR();
private static native final int H5D_VDS_FIRST_MISSING();
private static native final int H5D_VDS_LAST_AVAILABLE();
private static native final int H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS();
private static native final long H5E_ALIGNMENT();
private static native final long H5E_ALREADYEXISTS();
private static native final long H5E_ALREADYINIT();
private static native final long H5E_ARGS();
private static native final long H5E_ID();
private static native final long H5E_ATTR();
private static native final long H5E_BADID();
private static native final long H5E_BADFILE();
private static native final long H5E_BADGROUP();
private static native final long H5E_BADITER();
private static native final long H5E_BADMESG();
private static native final long H5E_BADRANGE();
private static native final long H5E_BADSELECT();
private static native final long H5E_BADSIZE();
private static native final long H5E_BADTYPE();
private static native final long H5E_BADVALUE();
private static native final long H5E_BTREE();
private static native final long H5E_CACHE();
private static native final long H5E_CALLBACK();
private static native final long H5E_CANAPPLY();
private static native final long H5E_CANTALLOC();
private static native final long H5E_CANTAPPEND();
private static native final long H5E_CANTATTACH();
private static native final long H5E_CANTCLEAN();
private static native final long H5E_CANTCLIP();
private static native final long H5E_CANTCLOSEFILE();
private static native final long H5E_CANTCLOSEOBJ();
private static native final long H5E_CANTCOMPARE();
private static native final long H5E_CANTCOMPUTE();
private static native final long H5E_CANTCONVERT();
private static native final long H5E_CANTCOPY();
private static native final long H5E_CANTCORK();
private static native final long H5E_CANTCOUNT();
private static native final long H5E_CANTCREATE();
private static native final long H5E_CANTDEC();
private static native final long H5E_CANTDECODE();
private static native final long H5E_CANTDELETE();
private static native final long H5E_CANTDELETEFILE();
private static native final long H5E_CANTDEPEND();
private static native final long H5E_CANTDIRTY();
private static native final long H5E_CANTENCODE();
private static native final long H5E_CANTEXPUNGE();
private static native final long H5E_CANTEXTEND();
private static native final long H5E_CANTFILTER();
private static native final long H5E_CANTFLUSH();
private static native final long H5E_CANTFREE();
private static native final long H5E_CANTGATHER();
private static native final long H5E_CANTGC();
private static native final long H5E_CANTGET();
private static native final long H5E_CANTGETSIZE();
private static native final long H5E_CANTINC();
private static native final long H5E_CANTINIT();
private static native final long H5E_CANTINS();
private static native final long H5E_CANTINSERT();
private static native final long H5E_CANTLIST();
private static native final long H5E_CANTLOAD();
private static native final long H5E_CANTLOCK();
private static native final long H5E_CANTLOCKFILE();
private static native final long H5E_CANTMARKCLEAN();
private static native final long H5E_CANTMARKDIRTY();
private static native final long H5E_CANTMARKSERIALIZED();
private static native final long H5E_CANTMARKUNSERIALIZED();
private static native final long H5E_CANTMERGE();
private static native final long H5E_CANTMOVE();
private static native final long H5E_CANTMODIFY();
private static native final long H5E_CANTNEXT();
private static native final long H5E_CANTNOTIFY();
private static native final long H5E_CANTOPENFILE();
private static native final long H5E_CANTOPENOBJ();
private static native final long H5E_CANTOPERATE();
private static native final long H5E_CANTPACK();
private static native final long H5E_CANTPIN();
private static native final long H5E_CANTPROTECT();
private static native final long H5E_CANTRECV();
private static native final long H5E_CANTREDISTRIBUTE();
private static native final long H5E_CANTREGISTER();
private static native final long H5E_CANTRELEASE();
private static native final long H5E_CANTREMOVE();
private static native final long H5E_CANTRENAME();
private static native final long H5E_CANTRESET();
private static native final long H5E_CANTRESIZE();
private static native final long H5E_CANTRESTORE();
private static native final long H5E_CANTREVIVE();
private static native final long H5E_CANTSHRINK();
private static native final long H5E_CANTSELECT();
private static native final long H5E_CANTSET();
private static native final long H5E_CANTSERIALIZE();
private static native final long H5E_CANTSORT();
private static native final long H5E_CANTSPLIT();
private static native final long H5E_CANTSWAP();
private static native final long H5E_CANTTAG();
private static native final long H5E_CANTUNCORK();
private static native final long H5E_CANTUNDEPEND();
private static native final long H5E_CANTUNLOCK();
private static native final long H5E_CANTUNLOCKFILE();
private static native final long H5E_CANTUNPIN();
private static native final long H5E_CANTUNPROTECT();
private static native final long H5E_CANTUNSERIALIZE();
private static native final long H5E_CANTUPDATE();
private static native final long H5E_CLOSEERROR();
private static native final long H5E_COMPLEN();
private static native final long H5E_CONTEXT();
private static native final long H5E_DATASET();
private static native final long H5E_DATASPACE();
private static native final long H5E_DATATYPE();
private static native final long H5E_DEFAULT();
private static native final long H5E_DUPCLASS();
private static native final long H5E_EARRAY();
private static native final long H5E_EFL();
private static native final long H5E_ERROR();
private static native final long H5E_EXISTS();
private static native final long H5E_FARRAY();
private static native final long H5E_FCNTL();
private static native final long H5E_FILE();
private static native final long H5E_FILEEXISTS();
private static native final long H5E_FILEOPEN();
private static native final long H5E_FSPACE();
private static native final long H5E_FUNC();
private static native final long H5E_HEAP();
private static native final long H5E_INCONSISTENTSTATE();
private static native final long H5E_INTERNAL();
private static native final long H5E_IO();
private static native final long H5E_LINK();
private static native final long H5E_LINKCOUNT();
private static native final long H5E_LOGGING();
private static native final int H5E_MAJOR();
private static native final long H5E_MAP();
private static native final int H5E_MINOR();
private static native final long H5E_MOUNT();
private static native final long H5E_MPI();
private static native final long H5E_MPIERRSTR();
private static native final long H5E_NLINKS();
private static native final long H5E_NO_INDEPENDENT();
private static native final long H5E_NOENCODER();
private static native final long H5E_NOFILTER();
private static native final long H5E_NOIDS();
private static native final long H5E_NONE_MAJOR();
private static native final long H5E_NONE_MINOR();
private static native final long H5E_NOSPACE();
private static native final long H5E_NOTCACHED();
private static native final long H5E_NOTFOUND();
private static native final long H5E_NOTHDF5();
private static native final long H5E_NOTREGISTERED();
private static native final long H5E_OBJOPEN();
private static native final long H5E_OHDR();
private static native final long H5E_OPENERROR();
private static native final long H5E_OVERFLOW();
private static native final long H5E_PAGEBUF();
private static native final long H5E_PATH();
private static native final long H5E_PLINE();
private static native final long H5E_PLIST();
private static native final long H5E_PLUGIN();
private static native final long H5E_PROTECT();
private static native final long H5E_READERROR();
private static native final long H5E_REFERENCE();
private static native final long H5E_RESOURCE();
private static native final long H5E_RS();
private static native final long H5E_SEEKERROR();
private static native final long H5E_SETDISALLOWED();
private static native final long H5E_SETLOCAL();
private static native final long H5E_SLIST();
private static native final long H5E_SOHM();
private static native final long H5E_STORAGE();
private static native final long H5E_SYM();
private static native final long H5E_SYSERRSTR();
private static native final long H5E_SYSTEM();
private static native final long H5E_TRAVERSE();
private static native final long H5E_TRUNCATED();
private static native final long H5E_TST();
private static native final long H5E_UNINITIALIZED();
private static native final long H5E_UNSUPPORTED();
private static native final long H5E_VERSION();
private static native final long H5E_VFL();
private static native final long H5E_VOL();
private static native final long H5E_WALK_DOWNWARD();
private static native final long H5E_WALK_UPWARD();
private static native final long H5E_WRITEERROR();
private static native final int H5ES_STATUS_IN_PROGRESS();
private static native final int H5ES_STATUS_SUCCEED();
private static native final int H5ES_STATUS_FAIL();
private static native final int H5ES_STATUS_CANCELED();
private static native final int H5F_ACC_CREAT();
private static native final int H5F_ACC_EXCL();
private static native final int H5F_ACC_RDONLY();
private static native final int H5F_ACC_RDWR();
private static native final int H5F_ACC_TRUNC();
private static native final int H5F_ACC_DEFAULT();
private static native final int H5F_ACC_SWMR_READ();
private static native final int H5F_ACC_SWMR_WRITE();
private static native final int H5F_CLOSE_DEFAULT();
private static native final int H5F_CLOSE_SEMI();
private static native final int H5F_CLOSE_STRONG();
private static native final int H5F_CLOSE_WEAK();
private static native final int H5F_LIBVER_ERROR();
private static native final int H5F_LIBVER_EARLIEST();
private static native final int H5F_LIBVER_V18();
private static native final int H5F_LIBVER_V110();
private static native final int H5F_LIBVER_V112();
private static native final int H5F_LIBVER_V114();
private static native final int H5F_LIBVER_V200();
private static native final int H5F_LIBVER_LATEST();
private static native final int H5F_LIBVER_NBOUNDS();
private static native final int H5F_OBJ_ALL();
private static native final int H5F_OBJ_ATTR();
private static native final int H5F_OBJ_DATASET();
private static native final int H5F_OBJ_DATATYPE();
private static native final int H5F_OBJ_FILE();
private static native final int H5F_OBJ_GROUP();
private static native final int H5F_OBJ_LOCAL(); /* 1.6.5 */
private static native final int H5F_SCOPE_DOWN();
private static native final int H5F_SCOPE_GLOBAL();
private static native final int H5F_SCOPE_LOCAL();
private static native final int H5F_UNLIMITED();
private static native final int H5F_FSPACE_STRATEGY_FSM_AGGR();
private static native final int H5F_FSPACE_STRATEGY_AGGR();
private static native final int H5F_FSPACE_STRATEGY_PAGE();
private static native final int H5F_FSPACE_STRATEGY_NONE();
private static native final int H5F_FSPACE_STRATEGY_NTYPES();
private static native final long H5FD_CORE();
private static native final long H5FD_DIRECT();
private static native final long H5FD_FAMILY();
private static native final long H5FD_LOG();
private static native final long H5FD_MPIO();
private static native final long H5FD_MULTI();
private static native final long H5FD_SEC2();
private static native final long H5FD_STDIO();
private static native final long H5FD_WINDOWS();
private static native final long H5FD_ROS3();
private static native final long H5FD_HDFS();
private static native final int H5FD_LOG_LOC_READ();
private static native final int H5FD_LOG_LOC_WRITE();
private static native final int H5FD_LOG_LOC_SEEK();
private static native final int H5FD_LOG_LOC_IO();
private static native final int H5FD_LOG_FILE_READ();
private static native final int H5FD_LOG_FILE_WRITE();
private static native final int H5FD_LOG_FILE_IO();
private static native final int H5FD_LOG_FLAVOR();
private static native final int H5FD_LOG_NUM_READ();
private static native final int H5FD_LOG_NUM_WRITE();
private static native final int H5FD_LOG_NUM_SEEK();
private static native final int H5FD_LOG_NUM_TRUNCATE();
private static native final int H5FD_LOG_NUM_IO();
private static native final int H5FD_LOG_TIME_OPEN();
private static native final int H5FD_LOG_TIME_STAT();
private static native final int H5FD_LOG_TIME_READ();
private static native final int H5FD_LOG_TIME_WRITE();
private static native final int H5FD_LOG_TIME_SEEK();
private static native final int H5FD_LOG_TIME_CLOSE();
private static native final int H5FD_LOG_TIME_IO();
private static native final int H5FD_LOG_ALLOC();
private static native final int H5FD_LOG_ALL();
private static native final int H5FD_MEM_NOLIST();
private static native final int H5FD_MEM_DEFAULT();
private static native final int H5FD_MEM_SUPER();
private static native final int H5FD_MEM_BTREE();
private static native final int H5FD_MEM_DRAW();
private static native final int H5FD_MEM_GHEAP();
private static native final int H5FD_MEM_LHEAP();
private static native final int H5FD_MEM_OHDR();
private static native final int H5FD_MEM_NTYPES();
private static native final long H5FD_DEFAULT_HADDR_SIZE();
private static native final long H5FD_MEM_DEFAULT_SIZE();
private static native final long H5FD_MEM_DEFAULT_SUPER_SIZE();
private static native final long H5FD_MEM_DEFAULT_BTREE_SIZE();
private static native final long H5FD_MEM_DEFAULT_DRAW_SIZE();
private static native final long H5FD_MEM_DEFAULT_GHEAP_SIZE();
private static native final long H5FD_MEM_DEFAULT_LHEAP_SIZE();
private static native final long H5FD_MEM_DEFAULT_OHDR_SIZE();
private static native final int H5G_DATASET();
private static native final int H5G_GROUP();
private static native final int H5G_LINK();
private static native final int H5G_UDLINK();
private static native final int H5G_LINK_ERROR();
private static native final int H5G_LINK_HARD();
private static native final int H5G_LINK_SOFT();
private static native final int H5G_NLIBTYPES();
private static native final int H5G_NTYPES();
private static native final int H5G_NUSERTYPES();
private static native final int H5G_RESERVED_5();
private static native final int H5G_RESERVED_6();
private static native final int H5G_RESERVED_7();
private static native final int H5G_SAME_LOC();
private static native final int H5G_STORAGE_TYPE_UNKNOWN();
private static native final int H5G_STORAGE_TYPE_SYMBOL_TABLE();
private static native final int H5G_STORAGE_TYPE_COMPACT();
private static native final int H5G_STORAGE_TYPE_DENSE();
private static native final int H5G_TYPE();
private static native final int H5G_UNKNOWN();
private static native final int H5I_ATTR();
private static native final int H5I_BADID();
private static native final int H5I_DATASET();
private static native final int H5I_DATASPACE();
private static native final int H5I_DATATYPE();
private static native final int H5I_ERROR_CLASS();
private static native final int H5I_ERROR_MSG();
private static native final int H5I_ERROR_STACK();
private static native final int H5I_FILE();
private static native final int H5I_GENPROP_CLS();
private static native final int H5I_GENPROP_LST();
private static native final int H5I_GROUP();
private static native final int H5I_INVALID_HID();
private static native final int H5I_NTYPES();
private static native final int H5I_UNINIT();
private static native final int H5I_VFL();
private static native final int H5I_VOL();
private static native final int H5L_TYPE_ERROR();
private static native final int H5L_TYPE_HARD();
private static native final int H5L_TYPE_SOFT();
private static native final int H5L_TYPE_EXTERNAL();
private static native final int H5L_TYPE_MAX();
private static native final int H5O_COPY_SHALLOW_HIERARCHY_FLAG();
private static native final int H5O_COPY_EXPAND_SOFT_LINK_FLAG();
private static native final int H5O_COPY_EXPAND_EXT_LINK_FLAG();
private static native final int H5O_COPY_EXPAND_REFERENCE_FLAG();
private static native final int H5O_COPY_WITHOUT_ATTR_FLAG();
private static native final int H5O_COPY_PRESERVE_NULL_FLAG();
private static native final int H5O_INFO_BASIC();
private static native final int H5O_INFO_TIME();
private static native final int H5O_INFO_NUM_ATTRS();
private static native final int H5O_INFO_ALL();
private static native final int H5O_NATIVE_INFO_HDR();
private static native final int H5O_NATIVE_INFO_META_SIZE();
private static native final int H5O_NATIVE_INFO_ALL();
private static native final int H5O_SHMESG_NONE_FLAG();
private static native final int H5O_SHMESG_SDSPACE_FLAG();
private static native final int H5O_SHMESG_DTYPE_FLAG();
private static native final int H5O_SHMESG_FILL_FLAG();
private static native final int H5O_SHMESG_PLINE_FLAG();
private static native final int H5O_SHMESG_ATTR_FLAG();
private static native final int H5O_SHMESG_ALL_FLAG();
private static native final int H5O_TYPE_UNKNOWN();
private static native final int H5O_TYPE_GROUP();
private static native final int H5O_TYPE_DATASET();
private static native final int H5O_TYPE_NAMED_DATATYPE();
private static native final int H5O_TYPE_NTYPES();
private static native final int H5O_MAX_TOKEN_SIZE();
private static native final H5O_token_t H5O_TOKEN_UNDEF();
private static native final long H5P_ROOT();
private static native final long H5P_OBJECT_CREATE();
private static native final long H5P_FILE_CREATE();
private static native final long H5P_FILE_ACCESS();
private static native final long H5P_DATASET_CREATE();
private static native final long H5P_DATASET_ACCESS();
private static native final long H5P_DATASET_XFER();
private static native final long H5P_FILE_MOUNT();
private static native final long H5P_GROUP_CREATE();
private static native final long H5P_GROUP_ACCESS();
private static native final long H5P_DATATYPE_CREATE();
private static native final long H5P_DATATYPE_ACCESS();
private static native final long H5P_STRING_CREATE();
private static native final long H5P_ATTRIBUTE_CREATE();
private static native final long H5P_ATTRIBUTE_ACCESS();
private static native final long H5P_OBJECT_COPY();
private static native final long H5P_LINK_CREATE();
private static native final long H5P_LINK_ACCESS();
private static native final long H5P_VOL_INITIALIZE();
private static native final long H5P_FILE_CREATE_DEFAULT();
private static native final long H5P_FILE_ACCESS_DEFAULT();
private static native final long H5P_DATASET_CREATE_DEFAULT();
private static native final long H5P_DATASET_ACCESS_DEFAULT();
private static native final long H5P_DATASET_XFER_DEFAULT();
private static native final long H5P_FILE_MOUNT_DEFAULT();
private static native final long H5P_GROUP_CREATE_DEFAULT();
private static native final long H5P_GROUP_ACCESS_DEFAULT();
private static native final long H5P_DATATYPE_CREATE_DEFAULT();
private static native final long H5P_DATATYPE_ACCESS_DEFAULT();
private static native final long H5P_ATTRIBUTE_CREATE_DEFAULT();
private static native final long H5P_ATTRIBUTE_ACCESS_DEFAULT();
private static native final long H5P_OBJECT_COPY_DEFAULT();
private static native final long H5P_LINK_CREATE_DEFAULT();
private static native final long H5P_LINK_ACCESS_DEFAULT();
private static native final long H5P_VOL_INITIALIZE_DEFAULT();
private static native final int H5P_CRT_ORDER_TRACKED();
private static native final int H5P_CRT_ORDER_INDEXED();
private static native final long H5P_DEFAULT();
private static native final int H5PL_TYPE_ERROR();
private static native final int H5PL_TYPE_FILTER();
private static native final int H5PL_TYPE_VOL();
private static native final int H5PL_TYPE_NONE();
private static native final int H5PL_FILTER_PLUGIN();
private static native final int H5PL_ALL_PLUGIN();
private static native final int H5PL_VOL_PLUGIN();
private static native final int H5R_ATTR();
private static native final int H5R_BADTYPE();
private static native final int H5R_DATASET_REGION();
private static native final int H5R_DATASET_REGION1();
private static native final int H5R_DATASET_REGION2();
private static native final int H5R_MAXTYPE();
private static native final int H5R_DSET_REG_REF_BUF_SIZE();
private static native final int H5R_OBJ_REF_BUF_SIZE();
private static native final int H5R_REF_BUF_SIZE();
private static native final int H5R_OBJECT();
private static native final int H5R_OBJECT1();
private static native final int H5R_OBJECT2();
private static native final int H5S_ALL();
private static native final int H5S_MAX_RANK();
private static native final int H5S_NO_CLASS();
private static native final int H5S_NULL();
private static native final int H5S_SCALAR();
private static native final int H5S_SEL_ALL();
private static native final int H5S_SEL_ERROR();
private static native final int H5S_SEL_HYPERSLABS();
private static native final int H5S_SEL_N();
private static native final int H5S_SEL_NONE();
private static native final int H5S_SEL_POINTS();
private static native final int H5S_SELECT_AND();
private static native final int H5S_SELECT_APPEND();
private static native final int H5S_SELECT_INVALID();
private static native final int H5S_SELECT_NOOP();
private static native final int H5S_SELECT_NOTA();
private static native final int H5S_SELECT_NOTB();
private static native final int H5S_SELECT_OR();
private static native final int H5S_SELECT_PREPEND();
private static native final int H5S_SELECT_SET();
private static native final int H5S_SELECT_XOR();
private static native final int H5S_SIMPLE();
private static native final int H5S_UNLIMITED();
private static native final long H5T_ALPHA_B16();
private static native final long H5T_ALPHA_B32();
private static native final long H5T_ALPHA_B64();
private static native final long H5T_ALPHA_B8();
private static native final long H5T_ALPHA_F32();
private static native final long H5T_ALPHA_F64();
private static native final long H5T_ALPHA_I16();
private static native final long H5T_ALPHA_I32();
private static native final long H5T_ALPHA_I64();
private static native final long H5T_ALPHA_I8();
private static native final long H5T_ALPHA_U16();
private static native final long H5T_ALPHA_U32();
private static native final long H5T_ALPHA_U64();
private static native final long H5T_ALPHA_U8();
private static native final int H5T_ARRAY();
private static native final int H5T_BITFIELD();
private static native final int H5T_BKG_NO();
private static native final int H5T_BKG_YES();
private static native final long H5T_C_S1();
private static native final int H5T_COMPLEX();
private static native final int H5T_COMPOUND();
private static native final int H5T_CONV_CONV();
private static native final int H5T_CONV_FREE();
private static native final int H5T_CONV_INIT();
private static native final long H5T_COMPLEX_IEEE_F16BE();
private static native final long H5T_COMPLEX_IEEE_F16LE();
private static native final long H5T_COMPLEX_IEEE_F32BE();
private static native final long H5T_COMPLEX_IEEE_F32LE();
private static native final long H5T_COMPLEX_IEEE_F64BE();
private static native final long H5T_COMPLEX_IEEE_F64LE();
private static native final int H5T_CSET_ERROR();
private static native final int H5T_CSET_ASCII();
private static native final int H5T_CSET_UTF8();
private static native final int H5T_CSET_RESERVED_10();
private static native final int H5T_CSET_RESERVED_11();
private static native final int H5T_CSET_RESERVED_12();
private static native final int H5T_CSET_RESERVED_13();
private static native final int H5T_CSET_RESERVED_14();
private static native final int H5T_CSET_RESERVED_15();
private static native final int H5T_CSET_RESERVED_2();
private static native final int H5T_CSET_RESERVED_3();
private static native final int H5T_CSET_RESERVED_4();
private static native final int H5T_CSET_RESERVED_5();
private static native final int H5T_CSET_RESERVED_6();
private static native final int H5T_CSET_RESERVED_7();
private static native final int H5T_CSET_RESERVED_8();
private static native final int H5T_CSET_RESERVED_9();
private static native final int H5T_DIR_ASCEND();
private static native final int H5T_DIR_DEFAULT();
private static native final int H5T_DIR_DESCEND();
private static native final int H5T_ENUM();
private static native final int H5T_FLOAT();
private static native final long H5T_FORTRAN_S1();
private static native final long H5T_IEEE_F16BE();
private static native final long H5T_IEEE_F16LE();
private static native final long H5T_IEEE_F32BE();
private static native final long H5T_IEEE_F32LE();
private static native final long H5T_IEEE_F64BE();
private static native final long H5T_IEEE_F64LE();
private static native final long H5T_FLOAT_BFLOAT16BE();
private static native final long H5T_FLOAT_BFLOAT16LE();
private static native final long H5T_FLOAT_F8E4M3();
private static native final long H5T_FLOAT_F8E5M2();
private static native final int H5T_INTEGER();
private static native final long H5T_INTEL_B16();
private static native final long H5T_INTEL_B32();
private static native final long H5T_INTEL_B64();
private static native final long H5T_INTEL_B8();
private static native final long H5T_INTEL_F32();
private static native final long H5T_INTEL_F64();
private static native final long H5T_INTEL_I16();
private static native final long H5T_INTEL_I32();
private static native final long H5T_INTEL_I64();
private static native final long H5T_INTEL_I8();
private static native final long H5T_INTEL_U16();
private static native final long H5T_INTEL_U32();
private static native final long H5T_INTEL_U64();
private static native final long H5T_INTEL_U8();
private static native final long H5T_MIPS_B16();
private static native final long H5T_MIPS_B32();
private static native final long H5T_MIPS_B64();
private static native final long H5T_MIPS_B8();
private static native final long H5T_MIPS_F32();
private static native final long H5T_MIPS_F64();
private static native final long H5T_MIPS_I16();
private static native final long H5T_MIPS_I32();
private static native final long H5T_MIPS_I64();
private static native final long H5T_MIPS_I8();
private static native final long H5T_MIPS_U16();
private static native final long H5T_MIPS_U32();
private static native final long H5T_MIPS_U64();
private static native final long H5T_MIPS_U8();
private static native final long H5T_NATIVE_B16();
private static native final long H5T_NATIVE_B32();
private static native final long H5T_NATIVE_B64();
private static native final long H5T_NATIVE_B8();
private static native final long H5T_NATIVE_CHAR();
private static native final long H5T_NATIVE_DOUBLE();
private static native final long H5T_NATIVE_DOUBLE_COMPLEX();
private static native final long H5T_NATIVE_FLOAT();
private static native final long H5T_NATIVE_FLOAT16();
private static native final long H5T_NATIVE_FLOAT_COMPLEX();
private static native final long H5T_NATIVE_HADDR();
private static native final long H5T_NATIVE_HBOOL();
private static native final long H5T_NATIVE_HERR();
private static native final long H5T_NATIVE_HSIZE();
private static native final long H5T_NATIVE_HSSIZE();
private static native final long H5T_NATIVE_INT();
private static native final long H5T_NATIVE_INT_FAST16();
private static native final long H5T_NATIVE_INT_FAST32();
private static native final long H5T_NATIVE_INT_FAST64();
private static native final long H5T_NATIVE_INT_FAST8();
private static native final long H5T_NATIVE_INT_LEAST16();
private static native final long H5T_NATIVE_INT_LEAST32();
private static native final long H5T_NATIVE_INT_LEAST64();
private static native final long H5T_NATIVE_INT_LEAST8();
private static native final long H5T_NATIVE_INT16();
private static native final long H5T_NATIVE_INT32();
private static native final long H5T_NATIVE_INT64();
private static native final long H5T_NATIVE_INT8();
private static native final long H5T_NATIVE_LDOUBLE();
private static native final long H5T_NATIVE_LLONG();
private static native final long H5T_NATIVE_LONG();
private static native final long H5T_NATIVE_LDOUBLE_COMPLEX();
private static native final long H5T_NATIVE_OPAQUE();
private static native final long H5T_NATIVE_SCHAR();
private static native final long H5T_NATIVE_SHORT();
private static native final long H5T_NATIVE_UCHAR();
private static native final long H5T_NATIVE_UINT();
private static native final long H5T_NATIVE_UINT_FAST16();
private static native final long H5T_NATIVE_UINT_FAST32();
private static native final long H5T_NATIVE_UINT_FAST64();
private static native final long H5T_NATIVE_UINT_FAST8();
private static native final long H5T_NATIVE_UINT_LEAST16();
private static native final long H5T_NATIVE_UINT_LEAST32();
private static native final long H5T_NATIVE_UINT_LEAST64();
private static native final long H5T_NATIVE_UINT_LEAST8();
private static native final long H5T_NATIVE_UINT16();
private static native final long H5T_NATIVE_UINT32();
private static native final long H5T_NATIVE_UINT64();
private static native final long H5T_NATIVE_UINT8();
private static native final long H5T_NATIVE_ULLONG();
private static native final long H5T_NATIVE_ULONG();
private static native final long H5T_NATIVE_USHORT();
private static native final int H5T_NCLASSES();
private static native final int H5T_NO_CLASS();
private static native final int H5T_NORM_ERROR();
private static native final int H5T_NORM_IMPLIED();
private static native final int H5T_NORM_MSBSET();
private static native final int H5T_NORM_NONE();
private static native final int H5T_NPAD();
private static native final int H5T_NSGN();
private static native final int H5T_OPAQUE();
private static native final int H5T_OPAQUE_TAG_MAX();
private static native final int H5T_ORDER_BE();
private static native final int H5T_ORDER_ERROR();
private static native final int H5T_ORDER_LE();
private static native final int H5T_ORDER_NONE();
private static native final int H5T_ORDER_VAX();
private static native final int H5T_PAD_BACKGROUND();
private static native final int H5T_PAD_ERROR();
private static native final int H5T_PAD_ONE();
private static native final int H5T_PAD_ZERO();
private static native final int H5T_PERS_DONTCARE();
private static native final int H5T_PERS_HARD();
private static native final int H5T_PERS_SOFT();
private static native final int H5T_REFERENCE();
private static native final int H5T_SGN_2();
private static native final int H5T_SGN_ERROR();
private static native final int H5T_SGN_NONE();
private static native final long H5T_STD_B16BE();
private static native final long H5T_STD_B16LE();
private static native final long H5T_STD_B32BE();
private static native final long H5T_STD_B32LE();
private static native final long H5T_STD_B64BE();
private static native final long H5T_STD_B64LE();
private static native final long H5T_STD_B8BE();
private static native final long H5T_STD_B8LE();
private static native final long H5T_STD_I16BE();
private static native final long H5T_STD_I16LE();
private static native final long H5T_STD_I32BE();
private static native final long H5T_STD_I32LE();
private static native final long H5T_STD_I64BE();
private static native final long H5T_STD_I64LE();
private static native final long H5T_STD_I8BE();
private static native final long H5T_STD_I8LE();
private static native final long H5T_STD_REF_DSETREG();
private static native final long H5T_STD_REF_OBJ();
private static native final long H5T_STD_REF();
private static native final long H5T_STD_U16BE();
private static native final long H5T_STD_U16LE();
private static native final long H5T_STD_U32BE();
private static native final long H5T_STD_U32LE();
private static native final long H5T_STD_U64BE();
private static native final long H5T_STD_U64LE();
private static native final long H5T_STD_U8BE();
private static native final long H5T_STD_U8LE();
private static native final int H5T_STR_ERROR();
private static native final int H5T_STR_NULLPAD();
private static native final int H5T_STR_NULLTERM();
private static native final int H5T_STR_RESERVED_10();
private static native final int H5T_STR_RESERVED_11();
private static native final int H5T_STR_RESERVED_12();
private static native final int H5T_STR_RESERVED_13();
private static native final int H5T_STR_RESERVED_14();
private static native final int H5T_STR_RESERVED_15();
private static native final int H5T_STR_RESERVED_3();
private static native final int H5T_STR_RESERVED_4();
private static native final int H5T_STR_RESERVED_5();
private static native final int H5T_STR_RESERVED_6();
private static native final int H5T_STR_RESERVED_7();
private static native final int H5T_STR_RESERVED_8();
private static native final int H5T_STR_RESERVED_9();
private static native final int H5T_STR_SPACEPAD();
private static native final int H5T_STRING();
private static native final int H5T_TIME();
private static native final long H5T_UNIX_D32BE();
private static native final long H5T_UNIX_D32LE();
private static native final long H5T_UNIX_D64BE();
private static native final long H5T_UNIX_D64LE();
private static native final long H5T_VARIABLE();
private static native final int H5T_VLEN();
private static native final int H5T_VL_T();
private static native final int H5VL_CAP_FLAG_NONE();
private static native final int H5VL_CAP_FLAG_THREADSAFE();
private static native final long H5VL_NATIVE();
private static native final String H5VL_NATIVE_NAME();
private static native final int H5VL_NATIVE_VALUE();
private static native final int H5VL_NATIVE_VERSION();
private static native final int H5_VOL_INVALID();
private static native final int H5_VOL_NATIVE();
private static native final int H5_VOL_RESERVED();
private static native final int H5_VOL_MAX();
private static native final int H5Z_CB_CONT();
private static native final int H5Z_CB_ERROR();
private static native final int H5Z_CB_FAIL();
private static native final int H5Z_CB_NO();
private static native final int H5Z_DISABLE_EDC();
private static native final int H5Z_ENABLE_EDC();
private static native final int H5Z_ERROR_EDC();
private static native final int H5Z_FILTER_DEFLATE();
private static native final int H5Z_FILTER_ERROR();
private static native final int H5Z_FILTER_FLETCHER32();
private static native final int H5Z_FILTER_MAX();
private static native final int H5Z_FILTER_NBIT();
private static native final int H5Z_FILTER_NONE();
private static native final int H5Z_FILTER_RESERVED();
private static native final int H5Z_FILTER_SCALEOFFSET();
private static native final int H5Z_FILTER_SHUFFLE();
private static native final int H5Z_FILTER_SZIP();
private static native final int H5Z_FLAG_DEFMASK();
private static native final int H5Z_FLAG_INVMASK();
private static native final int H5Z_FLAG_MANDATORY();
private static native final int H5Z_FLAG_OPTIONAL();
private static native final int H5Z_FLAG_REVERSE();
private static native final int H5Z_FLAG_SKIP_EDC();
private static native final int H5Z_MAX_NFILTERS();
private static native final int H5Z_NO_EDC();
private static native final int H5Z_FILTER_CONFIG_ENCODE_ENABLED();
private static native final int H5Z_FILTER_CONFIG_DECODE_ENABLED();
private static native final int H5Z_SO_INT_MINBITS_DEFAULT();
private static native final int H5Z_SO_FLOAT_DSCALE();
private static native final int H5Z_SO_FLOAT_ESCALE();
private static native final int H5Z_SO_INT();
private static native final int H5Z_SHUFFLE_USER_NPARMS();
private static native final int H5Z_SHUFFLE_TOTAL_NPARMS();
private static native final int H5Z_SZIP_USER_NPARMS();
private static native final int H5Z_SZIP_TOTAL_NPARMS();
private static native final int H5Z_SZIP_PARM_MASK();
private static native final int H5Z_SZIP_PARM_PPB();
private static native final int H5Z_SZIP_PARM_BPP();
private static native final int H5Z_SZIP_PARM_PPS();
private static native final int H5Z_NBIT_USER_NPARMS();
private static native final int H5Z_SCALEOFFSET_USER_NPARMS();
private static native final int H5Z_FILTER_ALL();
}
+945
View File
@@ -0,0 +1,945 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib;
import java.util.Arrays;
import hdf.hdf5lib.exceptions.HDF5Exception;
import hdf.hdf5lib.exceptions.HDF5JavaException;
/**
* \page HDFARRAY Java Array Conversion
* This is a class for handling multidimensional arrays for HDF.
* <p>
* The purpose is to allow the storage and retrieval of arbitrary array types containing scientific data.
* <p>
* The methods support the conversion of an array to and from Java to a one-dimensional array of bytes
* suitable for I/O by the C library. <p> This class heavily uses the
* @ref HDFNATIVE
* class to convert between Java and C representations.
*/
public class HDFArray {
private Object _theArray = null;
private ArrayDescriptor _desc = null;
private byte[] _barray = null;
// public HDFArray() {}
/**
* The input must be a Java Array (possibly multidimensional) of primitive numbers or sub-classes of
* Number. <p> The input is analysed to determine the number of dimensions and size of each dimension, as
* well as the type of the elements. <p> The description is saved in private variables, and used to
* convert data.
*
* @param anArray
* The array object.
* @exception hdf.hdf5lib.exceptions.HDF5JavaException
* object is not an array.
*/
public HDFArray(Object anArray) throws HDF5JavaException
{
if (anArray == null) {
HDF5JavaException ex = new HDF5JavaException("HDFArray: array is null?: ");
}
Class tc = anArray.getClass();
if (tc.isArray() == false) {
/* exception: not an array */
HDF5JavaException ex = new HDF5JavaException("HDFArray: not an array?: ");
throw(ex);
}
_theArray = anArray;
_desc = new ArrayDescriptor(_theArray);
/* extra error checking -- probably not needed */
if (_desc == null) {
HDF5JavaException ex =
new HDF5JavaException("HDFArray: internal error: array description failed?: ");
throw(ex);
}
}
/**
* Allocate a one-dimensional array of bytes sufficient to store the array.
*
* @return A one-D array of bytes, filled with zeroes. The bytes are sufficient to hold the data of the
* Array passed to the constructor.
* @exception hdf.hdf5lib.exceptions.HDF5JavaException
* Allocation failed.
*/
public byte[] emptyBytes() throws HDF5JavaException
{
byte[] b = null;
if ((ArrayDescriptor.dims == 1) && (ArrayDescriptor.NT == 'B')) {
b = (byte[])_theArray;
}
else {
b = new byte[ArrayDescriptor.totalSize];
}
if (b == null) {
HDF5JavaException ex = new HDF5JavaException("HDFArray: emptyBytes: allocation failed");
throw(ex);
}
return (b);
}
/**
* Given a Java array of numbers, convert it to a one-dimensional array of bytes in correct native order.
*
* @return A one-D array of bytes, constructed from the Array passed to the constructor.
* @exception hdf.hdf5lib.exceptions.HDF5JavaException
* the object not an array or other internal error.
*/
public byte[] byteify() throws HDF5JavaException
{
if (_barray != null) {
return _barray;
}
if (_theArray == null) {
/* exception: not an array */
HDF5JavaException ex = new HDF5JavaException("HDFArray: byteify not an array?: ");
throw(ex);
}
if (ArrayDescriptor.dims == 1) {
/* special case */
if (ArrayDescriptor.NT == 'B') {
/* really special case! */
_barray = (byte[])_theArray;
return _barray;
}
else {
try {
_barray = new byte[ArrayDescriptor.totalSize];
byte[] therow;
if (ArrayDescriptor.NT == 'I') {
therow = HDFNativeData.intToByte(0, ArrayDescriptor.dimlen[1], (int[])_theArray);
}
else if (ArrayDescriptor.NT == 'S') {
therow = HDFNativeData.shortToByte(0, ArrayDescriptor.dimlen[1], (short[])_theArray);
}
else if (ArrayDescriptor.NT == 'F') {
therow = HDFNativeData.floatToByte(0, ArrayDescriptor.dimlen[1], (float[])_theArray);
}
else if (ArrayDescriptor.NT == 'J') {
therow = HDFNativeData.longToByte(0, ArrayDescriptor.dimlen[1], (long[])_theArray);
}
else if (ArrayDescriptor.NT == 'D') {
therow =
HDFNativeData.doubleToByte(0, ArrayDescriptor.dimlen[1], (double[])_theArray);
}
else if (ArrayDescriptor.NT == 'L') {
if (ArrayDescriptor.className.equals("java.lang.Byte")) {
therow = ByteObjToByte((Byte[])_theArray);
}
else if (ArrayDescriptor.className.equals("java.lang.Integer")) {
therow = IntegerToByte((Integer[])_theArray);
}
else if (ArrayDescriptor.className.equals("java.lang.Short")) {
therow = ShortToByte((Short[])_theArray);
}
else if (ArrayDescriptor.className.equals("java.lang.Float")) {
therow = FloatObjToByte((Float[])_theArray);
}
else if (ArrayDescriptor.className.equals("java.lang.Double")) {
therow = DoubleObjToByte((Double[])_theArray);
}
else if (ArrayDescriptor.className.equals("java.lang.Long")) {
therow = LongObjToByte((Long[])_theArray);
}
else {
HDF5JavaException ex = new HDF5JavaException("HDFArray: unknown type of Object?");
throw(ex);
}
}
else {
HDF5JavaException ex = new HDF5JavaException("HDFArray: unknown type of data?");
throw(ex);
}
System.arraycopy(therow, 0, _barray, 0,
(ArrayDescriptor.dimlen[1] * ArrayDescriptor.NTsize));
return _barray;
}
catch (OutOfMemoryError err) {
HDF5JavaException ex = new HDF5JavaException("HDFArray: byteify array too big?");
throw(ex);
}
}
}
try {
_barray = new byte[ArrayDescriptor.totalSize];
}
catch (OutOfMemoryError err) {
HDF5JavaException ex = new HDF5JavaException("HDFArray: byteify array too big?");
throw(ex);
}
Object oo = _theArray;
int n = 0; /* the current byte */
int index = 0;
int i;
while (n < ArrayDescriptor.totalSize) {
oo = ArrayDescriptor.objs[0];
index = n / ArrayDescriptor.bytetoindex[0];
index %= ArrayDescriptor.dimlen[0];
for (i = 0; i < (ArrayDescriptor.dims); i++) {
index = n / ArrayDescriptor.bytetoindex[i];
index %= ArrayDescriptor.dimlen[i];
if (index == ArrayDescriptor.currentindex[i]) {
/* then use cached copy */
oo = ArrayDescriptor.objs[i];
}
else {
/* check range of index */
if (index > (ArrayDescriptor.dimlen[i] - 1)) {
throw new java.lang.IndexOutOfBoundsException("HDFArray: byteify index OOB?");
}
oo = java.lang.reflect.Array.get(oo, index);
ArrayDescriptor.currentindex[i] = index;
ArrayDescriptor.objs[i] = oo;
}
}
/* byte-ify */
byte arow[];
try {
if (ArrayDescriptor.NT == 'J') {
arow = HDFNativeData.longToByte(0, ArrayDescriptor.dimlen[ArrayDescriptor.dims],
(long[])ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
}
else if (ArrayDescriptor.NT == 'I') {
arow = HDFNativeData.intToByte(0, ArrayDescriptor.dimlen[ArrayDescriptor.dims],
(int[])ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
}
else if (ArrayDescriptor.NT == 'S') {
arow = HDFNativeData.shortToByte(0, ArrayDescriptor.dimlen[ArrayDescriptor.dims],
(short[])ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
}
else if (ArrayDescriptor.NT == 'B') {
arow = (byte[])ArrayDescriptor.objs[ArrayDescriptor.dims - 1];
}
else if (ArrayDescriptor.NT == 'F') {
/* 32 bit float */
arow = HDFNativeData.floatToByte(0, ArrayDescriptor.dimlen[ArrayDescriptor.dims],
(float[])ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
}
else if (ArrayDescriptor.NT == 'D') {
/* 64 bit float */
arow =
HDFNativeData.doubleToByte(0, ArrayDescriptor.dimlen[ArrayDescriptor.dims],
(double[])ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
}
else if (ArrayDescriptor.NT == 'L') {
if (ArrayDescriptor.className.equals("java.lang.Byte")) {
arow = ByteObjToByte((Byte[])ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
}
else if (ArrayDescriptor.className.equals("java.lang.Integer")) {
arow = IntegerToByte((Integer[])ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
}
else if (ArrayDescriptor.className.equals("java.lang.Short")) {
arow = ShortToByte((Short[])ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
}
else if (ArrayDescriptor.className.equals("java.lang.Float")) {
arow = FloatObjToByte((Float[])ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
}
else if (ArrayDescriptor.className.equals("java.lang.Double")) {
arow = DoubleObjToByte((Double[])ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
}
else if (ArrayDescriptor.className.equals("java.lang.Long")) {
arow = LongObjToByte((Long[])ArrayDescriptor.objs[ArrayDescriptor.dims - 1]);
}
else {
HDF5JavaException ex =
new HDF5JavaException("HDFArray: byteify Object type not implemented?");
throw(ex);
}
}
else {
HDF5JavaException ex =
new HDF5JavaException("HDFArray: byteify unknown type not implemented?");
throw(ex);
}
System.arraycopy(arow, 0, _barray, n,
(ArrayDescriptor.dimlen[ArrayDescriptor.dims] * ArrayDescriptor.NTsize));
n += ArrayDescriptor.bytetoindex[ArrayDescriptor.dims - 1];
}
catch (OutOfMemoryError err) {
HDF5JavaException ex = new HDF5JavaException("HDFArray: byteify array too big?");
throw(ex);
}
}
/* assert: the whole array is completed--currentindex should == len - 1 */
/* error checks */
if (n < ArrayDescriptor.totalSize) {
throw new java.lang.InternalError(
new String("HDFArray::byteify: Panic didn't complete all input data: n= " + n +
" size = " + ArrayDescriptor.totalSize));
}
for (i = 0; i < ArrayDescriptor.dims; i++) {
if (ArrayDescriptor.currentindex[i] != ArrayDescriptor.dimlen[i] - 1) {
throw new java.lang.InternalError(new String("Panic didn't complete all data: currentindex[" +
i + "] = " + ArrayDescriptor.currentindex[i] +
" (should be " +
(ArrayDescriptor.dimlen[i] - 1) + " ?)"));
}
}
return _barray;
}
/**
* Given a one-dimensional array of bytes representing numbers, convert it to a java array of the shape
* and size passed to the constructor.
*
* @param bytes
* The bytes to construct the Array.
* @return
* An Array (possibly multidimensional) of primitive or number objects.
* @exception
* hdf.hdf5lib.exceptions.HDF5JavaException the object not an array or other internal error.
*/
public Object arrayify(byte[] bytes) throws HDF5JavaException
{
if (_theArray == null) {
/* exception: not an array */
HDF5JavaException ex = new HDF5JavaException("arrayify: not an array?: ");
throw(ex);
}
if (java.lang.reflect.Array.getLength(bytes) != ArrayDescriptor.totalSize) {
/* exception: array not right size */
HDF5JavaException ex = new HDF5JavaException("arrayify: array is wrong size?: ");
throw(ex);
}
_barray = bytes; /* hope that the bytes are correct.... */
if (ArrayDescriptor.dims == 1) {
/* special case */
/* 2 data copies here! */
try {
if (ArrayDescriptor.NT == 'I') {
int[] x = HDFNativeData.byteToInt(_barray);
System.arraycopy(x, 0, _theArray, 0, ArrayDescriptor.dimlen[1]);
return _theArray;
}
else if (ArrayDescriptor.NT == 'S') {
short[] x = HDFNativeData.byteToShort(_barray);
System.arraycopy(x, 0, _theArray, 0, ArrayDescriptor.dimlen[1]);
return _theArray;
}
else if (ArrayDescriptor.NT == 'F') {
float x[] = HDFNativeData.byteToFloat(_barray);
System.arraycopy(x, 0, _theArray, 0, ArrayDescriptor.dimlen[1]);
return _theArray;
}
else if (ArrayDescriptor.NT == 'J') {
long x[] = HDFNativeData.byteToLong(_barray);
System.arraycopy(x, 0, _theArray, 0, ArrayDescriptor.dimlen[1]);
return _theArray;
}
else if (ArrayDescriptor.NT == 'D') {
double x[] = HDFNativeData.byteToDouble(_barray);
System.arraycopy(x, 0, _theArray, 0, ArrayDescriptor.dimlen[1]);
return _theArray;
}
else if (ArrayDescriptor.NT == 'B') {
System.arraycopy(_barray, 0, _theArray, 0, ArrayDescriptor.dimlen[1]);
return _theArray;
}
else if (ArrayDescriptor.NT == 'L') {
if (ArrayDescriptor.className.equals("java.lang.Byte")) {
Byte I[] = ByteToByteObj(_barray);
System.arraycopy(I, 0, _theArray, 0, ArrayDescriptor.dimlen[1]);
return _theArray;
}
else if (ArrayDescriptor.className.equals("java.lang.Integer")) {
Integer I[] = ByteToInteger(_barray);
System.arraycopy(I, 0, _theArray, 0, ArrayDescriptor.dimlen[1]);
return _theArray;
}
else if (ArrayDescriptor.className.equals("java.lang.Short")) {
Short I[] = ByteToShort(_barray);
System.arraycopy(I, 0, _theArray, 0, ArrayDescriptor.dimlen[1]);
return _theArray;
}
else if (ArrayDescriptor.className.equals("java.lang.Float")) {
Float I[] = ByteToFloatObj(_barray);
System.arraycopy(I, 0, _theArray, 0, ArrayDescriptor.dimlen[1]);
return _theArray;
}
else if (ArrayDescriptor.className.equals("java.lang.Double")) {
Double I[] = ByteToDoubleObj(_barray);
System.arraycopy(I, 0, _theArray, 0, ArrayDescriptor.dimlen[1]);
return _theArray;
}
else if (ArrayDescriptor.className.equals("java.lang.Long")) {
Long I[] = ByteToLongObj(_barray);
System.arraycopy(I, 0, _theArray, 0, ArrayDescriptor.dimlen[1]);
return _theArray;
}
else {
HDF5JavaException ex =
new HDF5JavaException("arrayify: Object type not implemented yet...");
throw(ex);
}
}
else {
HDF5JavaException ex =
new HDF5JavaException("arrayify: unknown type not implemented yet...");
throw(ex);
}
}
catch (OutOfMemoryError err) {
HDF5JavaException ex = new HDF5JavaException("HDFArray: arrayify array too big?");
throw(ex);
}
}
/* Assert dims >= 2 */
Object oo = _theArray;
int n = 0; /* the current byte */
int m = 0; /* the current array index */
int index = 0;
int i;
Object flattenedArray = null;
switch (ArrayDescriptor.NT) {
case 'J':
flattenedArray = (Object)HDFNativeData.byteToLong(_barray);
break;
case 'S':
flattenedArray = (Object)HDFNativeData.byteToShort(_barray);
break;
case 'I':
flattenedArray = (Object)HDFNativeData.byteToInt(_barray);
break;
case 'F':
flattenedArray = (Object)HDFNativeData.byteToFloat(_barray);
break;
case 'D':
flattenedArray = (Object)HDFNativeData.byteToDouble(_barray);
break;
case 'B':
flattenedArray = (Object)_barray;
break;
case 'L': {
if (ArrayDescriptor.className.equals("java.lang.Byte"))
flattenedArray = (Object)ByteToByteObj(_barray);
else if (ArrayDescriptor.className.equals("java.lang.Short"))
flattenedArray = (Object)ByteToShort(_barray);
else if (ArrayDescriptor.className.equals("java.lang.Integer"))
flattenedArray = (Object)ByteToInteger(_barray);
else if (ArrayDescriptor.className.equals("java.lang.Long"))
flattenedArray = (Object)ByteToLongObj(_barray);
else if (ArrayDescriptor.className.equals("java.lang.Float"))
flattenedArray = (Object)ByteToFloatObj(_barray);
else if (ArrayDescriptor.className.equals("java.lang.Double"))
flattenedArray = (Object)ByteToDoubleObj(_barray);
else {
HDF5JavaException ex =
new HDF5JavaException("HDFArray: unsupported Object type: " + ArrayDescriptor.NT);
throw(ex);
}
break;
} // end of statement for arrays of boxed objects
default:
HDF5JavaException ex =
new HDF5JavaException("HDFArray: unknown or unsupported type: " + ArrayDescriptor.NT);
throw(ex);
} // end of switch statement for arrays of primitives
while (n < ArrayDescriptor.totalSize) {
oo = ArrayDescriptor.objs[0];
index = n / ArrayDescriptor.bytetoindex[0];
index %= ArrayDescriptor.dimlen[0];
for (i = 0; i < (ArrayDescriptor.dims); i++) {
index = n / ArrayDescriptor.bytetoindex[i];
index %= ArrayDescriptor.dimlen[i];
if (index == ArrayDescriptor.currentindex[i]) {
/* then use cached copy */
oo = ArrayDescriptor.objs[i];
}
else {
/* check range of index */
if (index > (ArrayDescriptor.dimlen[i] - 1)) {
System.out.println("out of bounds?");
return null;
}
oo = java.lang.reflect.Array.get(oo, index);
ArrayDescriptor.currentindex[i] = index;
ArrayDescriptor.objs[i] = oo;
}
}
/* array-ify */
try {
Object arow = null;
int mm = m + ArrayDescriptor.dimlen[ArrayDescriptor.dims];
switch (ArrayDescriptor.NT) {
case 'B':
arow = (Object)Arrays.copyOfRange((byte[])flattenedArray, m, mm);
break;
case 'S':
arow = (Object)Arrays.copyOfRange((short[])flattenedArray, m, mm);
break;
case 'I':
arow = (Object)Arrays.copyOfRange((int[])flattenedArray, m, mm);
break;
case 'J':
arow = (Object)Arrays.copyOfRange((long[])flattenedArray, m, mm);
break;
case 'F':
arow = (Object)Arrays.copyOfRange((float[])flattenedArray, m, mm);
break;
case 'D':
arow = (Object)Arrays.copyOfRange((double[])flattenedArray, m, mm);
break;
case 'L': {
if (ArrayDescriptor.className.equals("java.lang.Byte"))
arow = (Object)Arrays.copyOfRange((Byte[])flattenedArray, m, mm);
else if (ArrayDescriptor.className.equals("java.lang.Short"))
arow = (Object)Arrays.copyOfRange((Short[])flattenedArray, m, mm);
else if (ArrayDescriptor.className.equals("java.lang.Integer"))
arow = (Object)Arrays.copyOfRange((Integer[])flattenedArray, m, mm);
else if (ArrayDescriptor.className.equals("java.lang.Long"))
arow = (Object)Arrays.copyOfRange((Long[])flattenedArray, m, mm);
else if (ArrayDescriptor.className.equals("java.lang.Float"))
arow = (Object)Arrays.copyOfRange((Float[])flattenedArray, m, mm);
else if (ArrayDescriptor.className.equals("java.lang.Double"))
arow = (Object)Arrays.copyOfRange((Double[])flattenedArray, m, mm);
else {
HDF5JavaException ex =
new HDF5JavaException("HDFArray: unsupported Object type: " + ArrayDescriptor.NT);
throw(ex);
}
break;
} // end of statement for arrays of boxed numerics
} // end of switch statement for arrays of primitives
java.lang.reflect.Array.set(ArrayDescriptor.objs[ArrayDescriptor.dims - 2],
(ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]), arow);
n += ArrayDescriptor.bytetoindex[ArrayDescriptor.dims - 1];
ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]++;
m = mm;
}
catch (OutOfMemoryError err) {
HDF5JavaException ex = new HDF5JavaException("HDFArray: arrayify array too big?");
throw(ex);
}
}
/* assert: the whole array is completed--currentindex should == len - 1 */
/* error checks */
if (n < ArrayDescriptor.totalSize) {
throw new java.lang.InternalError(
new String("HDFArray::arrayify Panic didn't complete all input data: n= " + n +
" size = " + ArrayDescriptor.totalSize));
}
for (i = 0; i <= ArrayDescriptor.dims - 2; i++) {
if (ArrayDescriptor.currentindex[i] != ArrayDescriptor.dimlen[i] - 1) {
throw new java.lang.InternalError(
new String("HDFArray::arrayify Panic didn't complete all data: currentindex[" + i +
"] = " + ArrayDescriptor.currentindex[i] + " (should be " +
(ArrayDescriptor.dimlen[i] - 1) + "?"));
}
}
if (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1] !=
ArrayDescriptor.dimlen[ArrayDescriptor.dims - 1]) {
throw new java.lang.InternalError(new String(
"HDFArray::arrayify Panic didn't complete all data: currentindex[" + i + "] = " +
ArrayDescriptor.currentindex[i] + " (should be " + (ArrayDescriptor.dimlen[i]) + "?"));
}
return _theArray;
}
private byte[] IntegerToByte(Integer in[])
{
int nelems = java.lang.reflect.Array.getLength(in);
int[] out = new int[nelems];
for (int i = 0; i < nelems; i++) {
out[i] = in[i].intValue();
}
return HDFNativeData.intToByte(0, nelems, out);
}
private Integer[] ByteToInteger(byte[] bin)
{
int in[] = HDFNativeData.byteToInt(bin);
int nelems = java.lang.reflect.Array.getLength(in);
Integer[] out = new Integer[nelems];
for (int i = 0; i < nelems; i++) {
out[i] = Integer.valueOf(in[i]);
}
return out;
}
private Integer[] ByteToInteger(int start, int len, byte[] bin)
{
int in[] = HDFNativeData.byteToInt(start, len, bin);
int nelems = java.lang.reflect.Array.getLength(in);
Integer[] out = new Integer[nelems];
for (int i = 0; i < nelems; i++) {
out[i] = Integer.valueOf(in[i]);
}
return out;
}
private byte[] ShortToByte(Short in[])
{
int nelems = java.lang.reflect.Array.getLength(in);
short[] out = new short[nelems];
for (int i = 0; i < nelems; i++) {
out[i] = in[i].shortValue();
}
return HDFNativeData.shortToByte(0, nelems, out);
}
private Short[] ByteToShort(byte[] bin)
{
short in[] = HDFNativeData.byteToShort(bin);
int nelems = java.lang.reflect.Array.getLength((Object)in);
Short[] out = new Short[nelems];
for (int i = 0; i < nelems; i++) {
out[i] = Short.valueOf(in[i]);
}
return out;
}
private Short[] ByteToShort(int start, int len, byte[] bin)
{
short in[] = (short[])HDFNativeData.byteToShort(start, len, bin);
int nelems = java.lang.reflect.Array.getLength((Object)in);
Short[] out = new Short[nelems];
for (int i = 0; i < nelems; i++) {
out[i] = Short.valueOf(in[i]);
}
return out;
}
private byte[] ByteObjToByte(Byte in[])
{
int nelems = java.lang.reflect.Array.getLength((Object)in);
byte[] out = new byte[nelems];
for (int i = 0; i < nelems; i++) {
out[i] = in[i].byteValue();
}
return out;
}
private Byte[] ByteToByteObj(byte[] bin)
{
int nelems = java.lang.reflect.Array.getLength((Object)bin);
Byte[] out = new Byte[nelems];
for (int i = 0; i < nelems; i++) {
out[i] = Byte.valueOf(bin[i]);
}
return out;
}
private Byte[] ByteToByteObj(int start, int len, byte[] bin)
{
Byte[] out = new Byte[len];
for (int i = 0; i < len; i++) {
out[i] = Byte.valueOf(bin[i]);
}
return out;
}
private byte[] FloatObjToByte(Float in[])
{
int nelems = java.lang.reflect.Array.getLength((Object)in);
float[] out = new float[nelems];
for (int i = 0; i < nelems; i++) {
out[i] = in[i].floatValue();
}
return HDFNativeData.floatToByte(0, nelems, out);
}
private Float[] ByteToFloatObj(byte[] bin)
{
float in[] = (float[])HDFNativeData.byteToFloat(bin);
int nelems = java.lang.reflect.Array.getLength((Object)in);
Float[] out = new Float[nelems];
for (int i = 0; i < nelems; i++) {
out[i] = Float.valueOf(in[i]);
}
return out;
}
private Float[] ByteToFloatObj(int start, int len, byte[] bin)
{
float in[] = (float[])HDFNativeData.byteToFloat(start, len, bin);
int nelems = java.lang.reflect.Array.getLength((Object)in);
Float[] out = new Float[nelems];
for (int i = 0; i < nelems; i++) {
out[i] = Float.valueOf(in[i]);
}
return out;
}
private byte[] DoubleObjToByte(Double in[])
{
int nelems = java.lang.reflect.Array.getLength((Object)in);
double[] out = new double[nelems];
for (int i = 0; i < nelems; i++) {
out[i] = in[i].doubleValue();
}
return HDFNativeData.doubleToByte(0, nelems, out);
}
private Double[] ByteToDoubleObj(byte[] bin)
{
double in[] = (double[])HDFNativeData.byteToDouble(bin);
int nelems = java.lang.reflect.Array.getLength((Object)in);
Double[] out = new Double[nelems];
for (int i = 0; i < nelems; i++) {
out[i] = Double.valueOf(in[i]);
}
return out;
}
private Double[] ByteToDoubleObj(int start, int len, byte[] bin)
{
double in[] = (double[])HDFNativeData.byteToDouble(start, len, bin);
int nelems = java.lang.reflect.Array.getLength((Object)in);
Double[] out = new Double[nelems];
for (int i = 0; i < nelems; i++) {
out[i] = Double.valueOf(in[i]);
}
return out;
}
private byte[] LongObjToByte(Long in[])
{
int nelems = java.lang.reflect.Array.getLength((Object)in);
long[] out = new long[nelems];
for (int i = 0; i < nelems; i++) {
out[i] = in[i].longValue();
}
return HDFNativeData.longToByte(0, nelems, out);
}
private Long[] ByteToLongObj(byte[] bin)
{
long in[] = (long[])HDFNativeData.byteToLong(bin);
int nelems = java.lang.reflect.Array.getLength((Object)in);
Long[] out = new Long[nelems];
for (int i = 0; i < nelems; i++) {
out[i] = Long.valueOf(in[i]);
}
return out;
}
private Long[] ByteToLongObj(int start, int len, byte[] bin)
{
long in[] = (long[])HDFNativeData.byteToLong(start, len, bin);
int nelems = java.lang.reflect.Array.getLength((Object)in);
Long[] out = new Long[nelems];
for (int i = 0; i < nelems; i++) {
out[i] = Long.valueOf(in[i]);
}
return out;
}
}
/**
* This private class is used by HDFArray to discover the shape and type of an arbitrary array.
* <p>
* We use java.lang.reflection here.
*/
class ArrayDescriptor {
static String theType = "";
static Class theClass = null;
static int[] dimlen = null;
static int[] dimstart = null;
static int[] currentindex = null;
static int[] bytetoindex = null;
static int totalSize = 0;
static int totalElements = 0;
static Object[] objs = null;
static char NT = ' '; /* must be B,S,I,L,F,D, else error */
static int NTsize = 0;
static int dims = 0;
static String className;
public ArrayDescriptor(Object anArray) throws HDF5JavaException
{
Class tc = anArray.getClass();
if (tc.isArray() == false) {
/* exception: not an array */
HDF5JavaException ex = new HDF5JavaException("ArrayDescriptor: not an array?: ");
throw(ex);
}
theClass = tc;
/*
* parse the type descriptor to discover the shape of the array
*/
String ss = tc.toString();
theType = ss;
int n = 6;
dims = 0;
char c = ' ';
while (n < ss.length()) {
c = ss.charAt(n);
n++;
if (c == '[') {
dims++;
}
}
String css = ss.substring(ss.lastIndexOf('[') + 1);
Class compC = tc.getComponentType();
String cs = compC.toString();
NT = c; /* must be B,S,I,L,F,D, else error */
if (NT == 'B') {
NTsize = 1;
}
else if (NT == 'S') {
NTsize = 2;
}
else if ((NT == 'I') || (NT == 'F')) {
NTsize = 4;
}
else if ((NT == 'J') || (NT == 'D')) {
NTsize = 8;
}
else if (css.startsWith("Ljava.lang.Byte")) {
NT = 'L';
className = "java.lang.Byte";
NTsize = 1;
}
else if (css.startsWith("Ljava.lang.Short")) {
NT = 'L';
className = "java.lang.Short";
NTsize = 2;
}
else if (css.startsWith("Ljava.lang.Integer")) {
NT = 'L';
className = "java.lang.Integer";
NTsize = 4;
}
else if (css.startsWith("Ljava.lang.Float")) {
NT = 'L';
className = "java.lang.Float";
NTsize = 4;
}
else if (css.startsWith("Ljava.lang.Double")) {
NT = 'L';
className = "java.lang.Double";
NTsize = 8;
}
else if (css.startsWith("Ljava.lang.Long")) {
NT = 'L';
className = "java.lang.Long";
NTsize = 8;
}
else if (css.startsWith("Ljava.lang.String")) {
NT = 'L';
className = "java.lang.String";
NTsize = 1;
throw new HDF5JavaException(
new String("ArrayDesciptor: Warning: String array not fully supported yet"));
}
else {
/*
* exception: not a numeric type
*/
throw new HDF5JavaException(
new String("ArrayDesciptor: Error: array is not numeric (type is " + css + ") ?"));
}
/* fill in the table */
dimlen = new int[dims + 1];
dimstart = new int[dims + 1];
currentindex = new int[dims + 1];
bytetoindex = new int[dims + 1];
objs = new Object[dims + 1];
Object o = anArray;
objs[0] = o;
dimlen[0] = 1;
dimstart[0] = 0;
currentindex[0] = 0;
int elements = 1;
int i;
for (i = 1; i <= dims; i++) {
dimlen[i] = java.lang.reflect.Array.getLength((Object)o);
o = java.lang.reflect.Array.get((Object)o, 0);
objs[i] = o;
dimstart[i] = 0;
currentindex[i] = 0;
elements *= dimlen[i];
}
totalElements = elements;
int j;
int dd;
bytetoindex[dims] = NTsize;
for (i = dims; i >= 0; i--) {
dd = NTsize;
for (j = i; j < dims; j++) {
dd *= dimlen[j + 1];
}
bytetoindex[i] = dd;
}
totalSize = bytetoindex[0];
}
/**
* Debug dump
*/
public void dumpInfo()
{
System.out.println("Type: " + theType);
System.out.println("Class: " + theClass);
System.out.println("NT: " + NT + " NTsize: " + NTsize);
System.out.println("Array has " + dims + " dimensions (" + totalSize + " bytes, " + totalElements +
" elements)");
int i;
for (i = 0; i <= dims; i++) {
Class tc = objs[i].getClass();
String ss = tc.toString();
System.out.println(i + ": start " + dimstart[i] + ": len " + dimlen[i] + " current " +
currentindex[i] + " bytetoindex " + bytetoindex[i] + " object " + objs[i] +
" otype " + ss);
}
}
}
+458
View File
@@ -0,0 +1,458 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib;
import hdf.hdf5lib.exceptions.HDF5Exception;
import hdf.hdf5lib.exceptions.HDF5JavaException;
/**
* \page HDFNATIVE Native Arrays of Numbers
* This class encapsulates native methods to deal with arrays of numbers,
* converting from numbers to bytes and bytes to numbers.
* <p>
* These routines are used by class @ref HDFARRAY to pass data to and from the
* HDF5 library.
* <p>
* Methods xxxToByte() convert a Java array of primitive numbers (int, short,
* ...) to a Java array of bytes. Methods byteToXxx() convert from a Java array
* of bytes into a Java array of primitive numbers (int, short, ...)
* <p>
* Variant interfaces convert a section of an array, and also can convert to
* sub-classes of Java <b>Number</b>.
* <P>
* @see @ref HDFARRAY.
*/
public class HDFNativeData {
/**
* Convert an array of bytes into an array of ints
*
* @param data
* The input array of bytes
* @return an array of int
*/
public synchronized static native int[] byteToInt(byte[] data);
/**
* Convert an array of bytes into an array of floats
*
* @param data
* The input array of bytes
* @return an array of float
*/
public synchronized static native float[] byteToFloat(byte[] data);
/**
* Convert an array of bytes into an array of shorts
*
* @param data
* The input array of bytes
* @return an array of short
*/
public synchronized static native short[] byteToShort(byte[] data);
/**
* Convert an array of bytes into an array of long
*
* @param data
* The input array of bytes
* @return an array of long
*/
/*
* does this really work? C 'long' is 32 bits, Java 'long' is 64-bits. What
* does this routine actually do?
*/
public synchronized static native long[] byteToLong(byte[] data);
/**
* Convert an array of bytes into an array of double
*
* @param data
* The input array of bytes
* @return an array of double
*/
public synchronized static native double[] byteToDouble(byte[] data);
/**
* Convert a range from an array of bytes into an array of int
*
* @param start
* The position in the input array of bytes to start
* @param len
* The number of 'int' to convert
* @param data
* The input array of bytes
* @return an array of 'len' int
*/
public synchronized static native int[] byteToInt(int start, int len, byte[] data);
/**
* Convert 4 bytes from an array of bytes into a single int
*
* @param start
* The position in the input array of bytes to start
* @param data
* The input array of bytes
* @return The integer value of the bytes.
*/
public synchronized static int byteToInt(byte[] data, int start)
{
int[] ival = new int[1];
ival = byteToInt(start, 1, data);
return (ival[0]);
}
/**
* Convert a range from an array of bytes into an array of short
*
* @param start
* The position in the input array of bytes to start
* @param len
* The number of 'short' to convert
* @param data
* The input array of bytes
* @return an array of 'len' short
*/
public synchronized static native short[] byteToShort(int start, int len, byte[] data);
/**
* Convert 2 bytes from an array of bytes into a single short
*
* @param start
* The position in the input array of bytes to start
* @param data
* The input array of bytes
* @return The short value of the bytes.
*/
public synchronized static short byteToShort(byte[] data, int start)
{
short[] sval = new short[1];
sval = byteToShort(start, 1, data);
return (sval[0]);
}
/**
* Convert a range from an array of bytes into an array of float
*
* @param start
* The position in the input array of bytes to start
* @param len
* The number of 'float' to convert
* @param data
* The input array of bytes
* @return an array of 'len' float
*/
public synchronized static native float[] byteToFloat(int start, int len, byte[] data);
/**
* Convert 4 bytes from an array of bytes into a single float
*
* @param start
* The position in the input array of bytes to start
* @param data
* The input array of bytes
* @return The float value of the bytes.
*/
public synchronized static float byteToFloat(byte[] data, int start)
{
float[] fval = new float[1];
fval = byteToFloat(start, 1, data);
return (fval[0]);
}
/**
* Convert a range from an array of bytes into an array of long
*
* @param start
* The position in the input array of bytes to start
* @param len
* The number of 'long' to convert
* @param data
* The input array of bytes
* @return an array of 'len' long
*/
public synchronized static native long[] byteToLong(int start, int len, byte[] data);
/**
* Convert 8 bytes from an array of bytes into a single long
*
* @param start
* The position in the input array of bytes to start
* @param data
* The input array of bytes
* @return The long value of the bytes.
*/
public synchronized static long byteToLong(byte[] data, int start)
{
long[] lval = new long[1];
lval = byteToLong(start, 1, data);
return (lval[0]);
}
/**
* Convert a range from an array of bytes into an array of double
*
* @param start
* The position in the input array of bytes to start
* @param len
* The number of 'double' to convert
* @param data
* The input array of bytes
* @return an array of 'len' double
*/
public synchronized static native double[] byteToDouble(int start, int len, byte[] data);
/**
* Convert 8 bytes from an array of bytes into a single double
*
* @param start
* The position in the input array of bytes to start
* @param data
* The input array of bytes
* @return The double value of the bytes.
*/
public synchronized static double byteToDouble(byte[] data, int start)
{
double[] dval = new double[1];
dval = byteToDouble(start, 1, data);
return (dval[0]);
}
/**
* Convert a range from an array of int into an array of bytes.
*
* @param start
* The position in the input array of int to start
* @param len
* The number of 'int' to convert
* @param data
* The input array of int
* @return an array of bytes
*/
public synchronized static native byte[] intToByte(int start, int len, int[] data);
/**
* Convert a range from an array of short into an array of bytes.
*
* @param start
* The position in the input array of int to start
* @param len
* The number of 'short' to convert
* @param data
* The input array of short
* @return an array of bytes
*/
public synchronized static native byte[] shortToByte(int start, int len, short[] data);
/**
* Convert a range from an array of float into an array of bytes.
*
* @param start
* The position in the input array of int to start
* @param len
* The number of 'float' to convert
* @param data
* The input array of float
* @return an array of bytes
*/
public synchronized static native byte[] floatToByte(int start, int len, float[] data);
/**
* Convert a range from an array of long into an array of bytes.
*
* @param start
* The position in the input array of int to start
* @param len
* The number of 'long' to convert
* @param data
* The input array of long
* @return an array of bytes
*/
public synchronized static native byte[] longToByte(int start, int len, long[] data);
/**
* Convert a range from an array of double into an array of bytes.
*
* @param start
* The position in the input array of double to start
* @param len
* The number of 'double' to convert
* @param data
* The input array of double
* @return an array of bytes
*/
public synchronized static native byte[] doubleToByte(int start, int len, double[] data);
/**
* Convert a single byte into an array of one byte.
* <p>
* (This is a trivial method.)
*
* @param data
* The input byte
* @return an array of bytes
*/
public synchronized static native byte[] byteToByte(byte data);
/**
* Convert a single Byte object into an array of one byte.
* <p>
* (This is an almost trivial method.)
*
* @param data
* The input Byte
* @return an array of bytes
*/
public synchronized static byte[] byteToByte(Byte data) { return byteToByte(data.byteValue()); }
/**
* Convert a single int into an array of 4 bytes.
*
* @param data
* The input int
* @return an array of bytes
*/
public synchronized static native byte[] intToByte(int data);
/**
* Convert a single Integer object into an array of 4 bytes.
*
* @param data
* The input Integer
* @return an array of bytes
*/
public synchronized static byte[] intToByte(Integer data) { return intToByte(data.intValue()); }
/**
* Convert a single short into an array of 2 bytes.
*
* @param data
* The input short
* @return an array of bytes
*/
public synchronized static native byte[] shortToByte(short data);
/**
* Convert a single Short object into an array of 2 bytes.
*
* @param data
* The input Short
* @return an array of bytes
*/
public synchronized static byte[] shortToByte(Short data) { return shortToByte(data.shortValue()); }
/**
* Convert a single float into an array of 4 bytes.
*
* @param data
* The input float
* @return an array of bytes
*/
public synchronized static native byte[] floatToByte(float data);
/**
* Convert a single Float object into an array of 4 bytes.
*
* @param data
* The input Float
* @return an array of bytes
*/
public synchronized static byte[] floatToByte(Float data) { return floatToByte(data.floatValue()); };
/**
* Convert a single long into an array of 8 bytes.
*
* @param data
* The input long
* @return an array of bytes
*/
public synchronized static native byte[] longToByte(long data);
/**
* Convert a single Long object into an array of 8 bytes.
*
* @param data
* The input Long
* @return an array of bytes
*/
public synchronized static byte[] longToByte(Long data) { return longToByte(data.longValue()); }
/**
* Convert a single double into an array of 8 bytes.
*
* @param data
* The input double
* @return an array of bytes
*/
public synchronized static native byte[] doubleToByte(double data);
/**
* Convert a single Double object into an array of 8 bytes.
*
* @param data
* The input Double
* @return an array of bytes
*/
public synchronized static byte[] doubleToByte(Double data) { return doubleToByte(data.doubleValue()); }
/**
* Create a Number object from an array of bytes.
*
* @param barray
* The bytes to be converted
* @param obj
* Input object of the desired output class. Must be a sub-class
* of Number.
* @return A Object of the type of obj.
*
* @exception HDF5Exception
* - Error unsupported type.
*/
public synchronized static Object byteToNumber(byte[] barray, Object obj) throws HDF5Exception
{
Class theClass = obj.getClass();
String type = theClass.getName();
Object retobj = null;
if (type.equals("java.lang.Integer")) {
int[] i = hdf.hdf5lib.HDFNativeData.byteToInt(0, 1, barray);
retobj = Integer.valueOf(i[0]);
}
else if (type.equals("java.lang.Byte")) {
retobj = Byte.valueOf(barray[0]);
}
else if (type.equals("java.lang.Short")) {
short[] f = hdf.hdf5lib.HDFNativeData.byteToShort(0, 1, barray);
retobj = Short.valueOf(f[0]);
}
else if (type.equals("java.lang.Float")) {
float[] f = hdf.hdf5lib.HDFNativeData.byteToFloat(0, 1, barray);
retobj = Float.valueOf(f[0]);
}
else if (type.equals("java.lang.Long")) {
long[] f = hdf.hdf5lib.HDFNativeData.byteToLong(0, 1, barray);
retobj = Long.valueOf(f[0]);
}
else if (type.equals("java.lang.Double")) {
double[] f = hdf.hdf5lib.HDFNativeData.byteToDouble(0, 1, barray);
retobj = Double.valueOf(f[0]);
}
else {
/* exception: unsupported type */
HDF5Exception ex = new HDF5JavaException("byteToNumber: setfield bad type: " + obj + " " + type);
throw(ex);
}
return (retobj);
}
}
@@ -0,0 +1,43 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.callbacks;
import hdf.hdf5lib.structs.H5A_info_t;
/**
* Information class for link callback for H5Aiterate.
*
*/
public interface H5A_iterate_cb extends H5Callbacks {
/**
* @ingroup JCALLBK
*
* application callback for each attribute
*
* @param loc_id the ID for the group or dataset being iterated over
* @param name the name of the current attribute about the object
* @param info the attribute's "info" struct
* @param op_data the operator data passed in to H5Aiterate
*
* @return operation status
* A. Zero causes the iterator to continue, returning zero when all
* attributes have been processed.
* B. Positive causes the iterator to immediately return that positive
* value, indicating short-circuit success. The iterator can be
* restarted at the next attribute.
* C. Negative causes the iterator to immediately return that value,
* indicating failure. The iterator can be restarted at the next
* attribute.
*/
int callback(long loc_id, String name, H5A_info_t info, H5A_iterate_t op_data);
}
@@ -0,0 +1,24 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.callbacks;
/**
* Data class for link callback for H5Aiterate.
*
*/
public interface H5A_iterate_t {
/**
* public ArrayList iterdata = new ArrayList();
* Any derived interfaces must define the single public variable as above.
*/
}
@@ -0,0 +1,34 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.callbacks;
/**
* \page CALLBACKS HDF5 Java H5Callbacks Interface
* All callback definitions must derive from this interface. Any
* derived interfaces must define a single public method named "callback".
* You are responsible for deregistering your callback (if necessary)
* in its Object finalize method. If native code attempts to call
* a callback which has been GC'd, you will likely crash the VM. If
* there is no method to deregister the callback (e.g. <code>atexit</code>
* in the C library), you must ensure that you always keep a live reference
* to the callback object.
*
* A callback should generally never throw an exception, since it doesn't
* necessarily have an encompassing Java environment to catch it. Any
* exceptions thrown will be passed to the default callback exception
* handler.
*
* @defgroup JCALLBK HDF5 Library Java H5Callbacks
*/
public interface H5Callbacks {
}
@@ -0,0 +1,40 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.callbacks;
/**
* Information class for link callback for H5Pset/get_append_flush.
*
*/
public interface H5D_append_cb extends H5Callbacks {
/**
* @ingroup JCALLBK
*
* application callback for each dataset access property list
*
* @param dataset_id the ID for the dataset being iterated over
* @param cur_dims the dimension sizes for determining boundary
* @param op_data the operator data passed in to H5Pset/get_append_flush
*
* @return operation status
* A. Zero causes the iterator to continue, returning zero when all
* attributes have been processed.
* B. Positive causes the iterator to immediately return that positive
* value, indicating short-circuit success. The iterator can be
* restarted at the next attribute.
* C. Negative causes the iterator to immediately return that value,
* indicating failure. The iterator can be restarted at the next
* attribute.
*/
int callback(long dataset_id, long[] cur_dims, H5D_append_t op_data);
}
@@ -0,0 +1,24 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.callbacks;
/**
* Data class for link callback for H5Dappend.
*
*/
public interface H5D_append_t {
/**
* public ArrayList iterdata = new ArrayList();
* Any derived interfaces must define the single public variable as above.
*/
}
@@ -0,0 +1,42 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.callbacks;
/**
* Information class for link callback for H5Diterate.
*
*/
public interface H5D_iterate_cb extends H5Callbacks {
/**
* @ingroup JCALLBK
*
* application callback for each dataset element
*
* @param elem the pointer to the element in memory containing the current point
* @param elem_type the datatype ID for the elements stored in elem
* @param ndim the number of dimensions for POINT array
* @param point the array containing the location of the element within the original dataspace
* @param op_data the operator data passed in to H5Diterate
*
* @return operation status
* A. Zero causes the iterator to continue, returning zero when all
* attributes have been processed.
* B. Positive causes the iterator to immediately return that positive
* value, indicating short-circuit success. The iterator can be
* restarted at the next attribute.
* C. Negative causes the iterator to immediately return that value,
* indicating failure. The iterator can be restarted at the next
* attribute.
*/
int callback(byte[] elem, long elem_type, int ndim, long[] point, H5D_iterate_t op_data);
}
@@ -0,0 +1,24 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.callbacks;
/**
* Data class for link callback for H5Diterate.
*
*/
public interface H5D_iterate_t {
/**
* public ArrayList iterdata = new ArrayList();
* Any derived interfaces must define the single public variable as above.
*/
}
@@ -0,0 +1,42 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.callbacks;
import hdf.hdf5lib.structs.H5E_error2_t;
/**
* Information class for link callback for H5Ewalk.
*
*/
public interface H5E_walk_cb extends H5Callbacks {
/**
* @ingroup JCALLBK
*
* application callback for each error stack element
*
* @param nidx the index of the current error stack element
* @param info the error stack "info" struct
* @param op_data the operator data passed in to H5Ewalk
*
* @return operation status
* A. Zero causes the iterator to continue, returning zero when all
* attributes have been processed.
* B. Positive causes the iterator to immediately return that positive
* value, indicating short-circuit success. The iterator can be
* restarted at the next attribute.
* C. Negative causes the iterator to immediately return that value,
* indicating failure. The iterator can be restarted at the next
* attribute.
*/
int callback(int nidx, H5E_error2_t info, H5E_walk_t op_data);
}
@@ -0,0 +1,24 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.callbacks;
/**
* Data class for link callback for H5Ewalk.
*
*/
public interface H5E_walk_t {
/**
* public ArrayList iterdata = new ArrayList();
* Any derived interfaces must define the single public variable as above.
*/
}
@@ -0,0 +1,20 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.callbacks;
/**
* Data class for link callback for H5Lvisit/H5Lvisit_by_name.
*
*/
public interface H5L_iterate_opdata_t {
}
@@ -0,0 +1,43 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.callbacks;
import hdf.hdf5lib.structs.H5L_info_t;
/**
* Information class for link callback for H5Lvisit/H5Lvisit_by_name.
*
*/
public interface H5L_iterate_t extends H5Callbacks {
/**
* @ingroup JCALLBK
*
* application callback for each group
*
* @param loc_id the ID for the group being iterated over
* @param name the name of the current link
* @param info the link's "info" struct
* @param op_data the operator data passed in to H5Literate
*
* @return operation status
* A. Zero causes the iterator to continue, returning zero when all
* attributes have been processed.
* B. Positive causes the iterator to immediately return that positive
* value, indicating short-circuit success. The iterator can be
* restarted at the next attribute.
* C. Negative causes the iterator to immediately return that value,
* indicating failure. The iterator can be restarted at the next
* attribute.
*/
int callback(long loc_id, String name, H5L_info_t info, H5L_iterate_opdata_t op_data);
}
@@ -0,0 +1,20 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.callbacks;
/**
* Data class for link callback for H5Ovisit/H5Ovisit_by_name.
*
*/
public interface H5O_iterate_opdata_t {
}
@@ -0,0 +1,43 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.callbacks;
import hdf.hdf5lib.structs.H5O_info_t;
/**
* Information class for link callback for H5Ovisit/H5Ovisit_by_name.
*
*/
public interface H5O_iterate_t extends H5Callbacks {
/**
* @ingroup JCALLBK
*
* application callback for each group
*
* @param loc_id the ID for the group or dataset being iterated over
* @param name the name of the current object
* @param info the object's "info" struct
* @param op_data the operator data passed in to H5Oiterate
*
* @return operation status
* A. Zero causes the iterator to continue, returning zero when all
* attributes have been processed.
* B. Positive causes the iterator to immediately return that positive
* value, indicating short-circuit success. The iterator can be
* restarted at the next attribute.
* C. Negative causes the iterator to immediately return that value,
* indicating failure. The iterator can be restarted at the next
* attribute.
*/
int callback(long loc_id, String name, H5O_info_t info, H5O_iterate_opdata_t op_data);
}
@@ -0,0 +1,39 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.callbacks;
/**
* Information class for link callback for H5Pcreate_class.
*
*/
public interface H5P_cls_close_func_cb extends H5Callbacks {
/**
* @ingroup JCALLBK
*
* application callback for each property list
*
* @param prop_id the ID for the property list class being iterated over
* @param close_data the function to call when a property list is closed
*
* @return operation status
* A. Zero causes the iterator to continue, returning zero when all
* attributes have been processed.
* B. Positive causes the iterator to immediately return that positive
* value, indicating short-circuit success. The iterator can be
* restarted at the next attribute.
* C. Negative causes the iterator to immediately return that value,
* indicating failure. The iterator can be restarted at the next
* attribute.
*/
int callback(long prop_id, H5P_cls_close_func_t close_data);
}
@@ -0,0 +1,24 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.callbacks;
/**
* Data class for link callback for H5Pcreate_class.
*
*/
public interface H5P_cls_close_func_t {
/**
* public ArrayList iterdata = new ArrayList();
* Any derived interfaces must define the single public variable as above.
*/
}
@@ -0,0 +1,40 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.callbacks;
/**
* Information class for link callback for H5Pcreate_class
*
*/
public interface H5P_cls_copy_func_cb extends H5Callbacks {
/**
* @ingroup JCALLBK
*
* application callback for each property list
*
* @param new_prop_id the ID for the property list copy
* @param old_prop_id the ID for the property list class being copied
* @param copy_data the function to call when each property list in this class is copied
*
* @return operation status
* A. Zero causes the iterator to continue, returning zero when all
* attributes have been processed.
* B. Positive causes the iterator to immediately return that positive
* value, indicating short-circuit success. The iterator can be
* restarted at the next attribute.
* C. Negative causes the iterator to immediately return that value,
* indicating failure. The iterator can be restarted at the next
* attribute.
*/
int callback(long new_prop_id, long old_prop_id, H5P_cls_copy_func_t copy_data);
}
@@ -0,0 +1,24 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.callbacks;
/**
* Data class for link callback for H5Pcreate_class.
*
*/
public interface H5P_cls_copy_func_t {
/**
* public ArrayList iterdata = new ArrayList();
* Any derived interfaces must define the single public variable as above.
*/
}
@@ -0,0 +1,39 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.callbacks;
/**
* Information class for link callback for H5Pcreate_class.
*
*/
public interface H5P_cls_create_func_cb extends H5Callbacks {
/**
* @ingroup JCALLBK
*
* application callback for each property list
*
* @param prop_id the ID for the property list class being iterated over
* @param create_data the function to call when each property list in this class is created
*
* @return operation status
* A. Zero causes the iterator to continue, returning zero when all
* attributes have been processed.
* B. Positive causes the iterator to immediately return that positive
* value, indicating short-circuit success. The iterator can be
* restarted at the next attribute.
* C. Negative causes the iterator to immediately return that value,
* indicating failure. The iterator can be restarted at the next
* attribute.
*/
int callback(long prop_id, H5P_cls_create_func_t create_data);
}
@@ -0,0 +1,24 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.callbacks;
/**
* Data class for link callback for H5Pcreate_class.
*
*/
public interface H5P_cls_create_func_t {
/**
* public ArrayList iterdata = new ArrayList();
* Any derived interfaces must define the single public variable as above.
*/
}
@@ -0,0 +1,40 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.callbacks;
/**
* Information class for link callback for H5Piterate.
*
*/
public interface H5P_iterate_cb extends H5Callbacks {
/**
* @ingroup JCALLBK
*
* application callback for each property list
*
* @param plist the ID for the property list being iterated over
* @param name the name of the current property list
* @param op_data the operator data passed in to H5Piterate
*
* @return operation status
* A. Zero causes the iterator to continue, returning zero when all
* attributes have been processed.
* B. Positive causes the iterator to immediately return that positive
* value, indicating short-circuit success. The iterator can be
* restarted at the next attribute.
* C. Negative causes the iterator to immediately return that value,
* indicating failure. The iterator can be restarted at the next
* attribute.
*/
int callback(long plist, String name, H5P_iterate_t op_data);
}
@@ -0,0 +1,24 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.callbacks;
/**
* Data class for link callback for H5Piterate.
*
*/
public interface H5P_iterate_t {
/**
* public ArrayList iterdata = new ArrayList();
* Any derived interfaces must define the single public variable as above.
*/
}
@@ -0,0 +1,40 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.callbacks;
/**
* Information class for link callback for H5Pregister2.
*
*/
public interface H5P_prp_close_func_cb extends H5Callbacks {
/**
* @ingroup JCALLBK
*
* application callback for each property list
*
* @param name the name of the property being closed
* @param size the size of the property value
* @param value the value of the property being closed
*
* @return operation status
* A. Zero causes the iterator to continue, returning zero when all
* attributes have been processed.
* B. Positive causes the iterator to immediately return that positive
* value, indicating short-circuit success. The iterator can be
* restarted at the next attribute.
* C. Negative causes the iterator to immediately return that value,
* indicating failure. The iterator can be restarted at the next
* attribute.
*/
int callback(String name, long size, byte[] value);
}
@@ -0,0 +1,40 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.callbacks;
/**
* Information class for link callback for H5Pregister2.
*
*/
public interface H5P_prp_compare_func_cb extends H5Callbacks {
/**
* @ingroup JCALLBK
*
* application callback for each property list
*
* @param value1 the value of the first property being compared
* @param value2 the value of the second property being compared
* @param size the size of the property value
*
* @return operation status
* A. Zero causes the iterator to continue, returning zero when all
* attributes have been processed.
* B. Positive causes the iterator to immediately return that positive
* value, indicating short-circuit success. The iterator can be
* restarted at the next attribute.
* C. Negative causes the iterator to immediately return that value,
* indicating failure. The iterator can be restarted at the next
* attribute.
*/
int callback(byte[] value1, byte[] value2, long size);
}
@@ -0,0 +1,40 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.callbacks;
/**
* Information class for link callback for H5Pregister2.
*
*/
public interface H5P_prp_copy_func_cb extends H5Callbacks {
/**
* @ingroup JCALLBK
*
* application callback for each property list
*
* @param name the name of the property being copied
* @param size the size of the property value
* @param value the value of the property being copied
*
* @return operation status
* A. Zero causes the iterator to continue, returning zero when all
* attributes have been processed.
* B. Positive causes the iterator to immediately return that positive
* value, indicating short-circuit success. The iterator can be
* restarted at the next attribute.
* C. Negative causes the iterator to immediately return that value,
* indicating failure. The iterator can be restarted at the next
* attribute.
*/
int callback(String name, long size, byte[] value);
}
@@ -0,0 +1,40 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.callbacks;
/**
* Information class for link callback for H5Pregister2.
*
*/
public interface H5P_prp_create_func_cb extends H5Callbacks {
/**
* @ingroup JCALLBK
*
* application callback for each property list
*
* @param name the name of the property list being created
* @param size the size of the property value
* @param value the initial value for the property being created
*
* @return operation status
* A. Zero causes the iterator to continue, returning zero when all
* attributes have been processed.
* B. Positive causes the iterator to immediately return that positive
* value, indicating short-circuit success. The iterator can be
* restarted at the next attribute.
* C. Negative causes the iterator to immediately return that value,
* indicating failure. The iterator can be restarted at the next
* attribute.
*/
int callback(String name, long size, byte[] value);
}
@@ -0,0 +1,41 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.callbacks;
/**
* Information class for link callback for H5Pregister2.
*
*/
public interface H5P_prp_delete_func_cb extends H5Callbacks {
/**
* @ingroup JCALLBK
*
* application callback for each property list
*
* @param prop_id the ID of the property list the property is deleted from
* @param name the name of the property being deleted
* @param size the size of the property value
* @param value the value of the property being deleted
*
* @return operation status
* A. Zero causes the iterator to continue, returning zero when all
* attributes have been processed.
* B. Positive causes the iterator to immediately return that positive
* value, indicating short-circuit success. The iterator can be
* restarted at the next attribute.
* C. Negative causes the iterator to immediately return that value,
* indicating failure. The iterator can be restarted at the next
* attribute.
*/
int callback(long prop_id, String name, long size, byte[] value);
}
@@ -0,0 +1,41 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.callbacks;
/**
* Information class for link callback for H5Pregister2.
*
*/
public interface H5P_prp_get_func_cb extends H5Callbacks {
/**
* @ingroup JCALLBK
*
* application callback for each property list
*
* @param prop_id the ID for the property list being queried
* @param name the name of the property being queried
* @param size the size of the property value
* @param value the value being retrieved for the property
*
* @return operation status
* A. Zero causes the iterator to continue, returning zero when all
* attributes have been processed.
* B. Positive causes the iterator to immediately return that positive
* value, indicating short-circuit success. The iterator can be
* restarted at the next attribute.
* C. Negative causes the iterator to immediately return that value,
* indicating failure. The iterator can be restarted at the next
* attribute.
*/
int callback(long prop_id, String name, long size, byte[] value);
}
@@ -0,0 +1,41 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.callbacks;
/**
* Information class for link callback for H5Pregister2.
*
*/
public interface H5P_prp_set_func_cb extends H5Callbacks {
/**
* @ingroup JCALLBK
*
* application callback for each property list
*
* @param prop_id the ID for the property list being modified
* @param name the name of the property being modified
* @param size the size of the property value
* @param value the value being set for the property
*
* @return operation status
* A. Zero causes the iterator to continue, returning zero when all
* attributes have been processed.
* B. Positive causes the iterator to immediately return that positive
* value, indicating short-circuit success. The iterator can be
* restarted at the next attribute.
* C. Negative causes the iterator to immediately return that value,
* indicating failure. The iterator can be restarted at the next
* attribute.
*/
int callback(long prop_id, String name, long size, byte[] value);
}
@@ -0,0 +1,28 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
* \page CALLBACKS_UG HDF5 Java H5Callbacks Interface
* All callback definitions must derive from the H5Callbacks interface. Any
* derived interfaces must define a single public method named "callback".
* You are responsible for deregistering your callback (if necessary)
* in its {@link Object#finalize} method. If native code attempts to call
* a callback which has been GC'd, you will likely crash the VM. If
* there is no method to deregister the callback (e.g. <code>atexit</code>
* in the C library), you must ensure that you always keep a live reference
* to the callback object.<p>
* A callback should generally never throw an exception, since it doesn't
* necessarily have an encompassing Java environment to catch it. Any
* exceptions thrown will be passed to the default callback exception
* handler.
*/
package hdf.hdf5lib.callbacks;
@@ -0,0 +1,39 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.exceptions;
/**
* The class HDF5LibraryException returns errors raised by the HDF5 library.
* <p>
* This sub-class represents HDF5 major error code <b>H5E_ATTR</b>
*/
public class HDF5AttributeException extends HDF5LibraryException {
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5AttributeException</code> with no specified
* detail message.
*/
public HDF5AttributeException() { super(); }
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5AttributeException</code> with the specified
* detail message.
*
* @param s
* the detail message.
*/
public HDF5AttributeException(String s) { super(s); }
}
@@ -0,0 +1,39 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.exceptions;
/**
* The class HDF5LibraryException returns errors raised by the HDF5 library.
* <p>
* This sub-class represents HDF5 major error code <b>H5E_BTREE</b>
*/
public class HDF5BtreeException extends HDF5LibraryException {
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5BtreeException</code> with no specified detail
* message.
*/
public HDF5BtreeException() { super(); }
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5BtreeException</code> with the specified detail
* message.
*
* @param s
* the detail message.
*/
public HDF5BtreeException(String s) { super(s); }
}
@@ -0,0 +1,39 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.exceptions;
/**
* The class HDF5LibraryException returns errors raised by the HDF5 library.
* <p>
* This sub-class represents HDF5 major error code <b>H5E_PLINE</b>
*/
public class HDF5DataFiltersException extends HDF5LibraryException {
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5DataFiltersException</code> with no specified
* detail message.
*/
public HDF5DataFiltersException() { super(); }
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5DataFiltersException</code> with the specified
* detail message.
*
* @param s
* the detail message.
*/
public HDF5DataFiltersException(String s) { super(s); }
}
@@ -0,0 +1,40 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.exceptions;
/**
* The class HDF5LibraryException returns errors raised by the HDF5 library.
* <p>
* This sub-class represents HDF5 major error code <b>H5E_STORAGE</b>
*/
public class HDF5DataStorageException extends HDF5LibraryException {
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5DataStorageExceptionn</code> with no specified
* detail message.
*/
public HDF5DataStorageException() { super(); }
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5DataStorageException</code> with the specified
* detail message.
*
* @param s
* the detail message.
*/
public HDF5DataStorageException(String s) { super(s); }
}
@@ -0,0 +1,39 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.exceptions;
/**
* The class HDF5LibraryException returns errors raised by the HDF5 library.
* <p>
* This sub-class represents HDF5 major error code <b>H5E_DATASET</b>
*/
public class HDF5DatasetInterfaceException extends HDF5LibraryException {
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5DatasetInterfaceException</code> with no
* specified detail message.
*/
public HDF5DatasetInterfaceException() { super(); }
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5DatasetInterfaceException</code> with the
* specified detail message.
*
* @param s
* the detail message.
*/
public HDF5DatasetInterfaceException(String s) { super(s); }
}
@@ -0,0 +1,40 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.exceptions;
/**
* The class HDF5LibraryException returns errors raised by the HDF5 library.
* <p>
* This sub-class represents HDF5 major error code <b>H5E_DATASPACE</b>
*/
public class HDF5DataspaceInterfaceException extends HDF5LibraryException {
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5DataspaceInterfaceException</code> with no
* specified detail message.
*/
public HDF5DataspaceInterfaceException() { super(); }
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5DataspaceInterfaceException</code> with the
* specified detail message.
*
* @param s
* the detail message.
*/
public HDF5DataspaceInterfaceException(String s) { super(s); }
}
@@ -0,0 +1,40 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.exceptions;
/**
* The class HDF5LibraryException returns errors raised by the HDF5 library.
* <p>
* This sub-class represents HDF5 major error code <b>H5E_DATATYPE</b>
*/
public class HDF5DatatypeInterfaceException extends HDF5LibraryException {
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5DatatypeInterfaceException</code> with no
* specified detail message.
*/
public HDF5DatatypeInterfaceException() { super(); }
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5DatatypeInterfaceException</code> with the
* specified detail message.
*
* @param s
* the detail message.
*/
public HDF5DatatypeInterfaceException(String s) { super(s); }
}
@@ -0,0 +1,76 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.exceptions;
/**
* \page ERRORS Errors and Exceptions
* The class HDF5Exception returns errors from the Java HDF5 Interface.
*
* Two sub-classes of HDF5Exception are defined:
* <ol>
* <li>
* HDF5LibraryException -- errors raised by the HDF5 library code
* <li>
* HDF5JavaException -- errors raised by the HDF5 Java wrapper code
* </ol>
*
* These exceptions are sub-classed to represent specific error conditions, as
* needed. In particular, HDF5LibraryException has a sub-class for each major
* error code returned by the HDF5 library.
*
* @defgroup JERR HDF5 Library Exception Interface
*
*/
public class HDF5Exception extends RuntimeException {
/**
* the specified detail message of this exception
*/
protected String detailMessage;
/**
* @ingroup JERR
*
* Constructs an <code>HDF5Exception</code> with no specified detail
* message.
*/
public HDF5Exception() { super(); }
/**
* @ingroup JERR
*
* Constructs an <code>HDF5Exception</code> with the specified detail
* message.
*
* @param message
* the detail message.
*/
public HDF5Exception(String message)
{
super();
detailMessage = message;
}
/**
* @ingroup JERR
*
* Returns the detail message of this exception
*
* @return the detail message or <code>null</code> if this object does not
* have a detail message.
*/
@Override
public String getMessage()
{
return detailMessage;
}
}
@@ -0,0 +1,40 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.exceptions;
/**
* The class HDF5LibraryException returns errors raised by the HDF5 library.
* <p>
* This sub-class represents HDF5 major error code <b>H5E_EFL</b>
*/
public class HDF5ExternalFileListException extends HDF5LibraryException {
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5ExternalFileListException</code> with no
* specified detail message.
*/
public HDF5ExternalFileListException() { super(); }
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5ExternalFileListException</code> with the
* specified detail message.
*
* @param s
* the detail message.
*/
public HDF5ExternalFileListException(String s) { super(s); }
}
@@ -0,0 +1,40 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.exceptions;
/**
* The class HDF5LibraryException returns errors raised by the HDF5 library.
* <p>
* This sub-class represents HDF5 major error code <b>H5E_FILE</b>
*/
public class HDF5FileInterfaceException extends HDF5LibraryException {
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5FileInterfaceException</code> with no specified
* detail message.
*/
public HDF5FileInterfaceException() { super(); }
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5FileInterfaceException</code> with the specified
* detail message.
*
* @param s
* the detail message.
*/
public HDF5FileInterfaceException(String s) { super(s); }
}
@@ -0,0 +1,40 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.exceptions;
/**
* The class HDF5LibraryException returns errors raised by the HDF5 library.
* <p>
* This sub-class represents HDF5 major error code <b>H5E_ARGS</b>
*/
public class HDF5FunctionArgumentException extends HDF5LibraryException {
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5FunctionArgumentException</code> with no
* specified detail message.
*/
public HDF5FunctionArgumentException() { super(); }
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5FunctionArgumentException</code> with the
* specified detail message.
*
* @param s
* the detail message.
*/
public HDF5FunctionArgumentException(String s) { super(s); }
}
@@ -0,0 +1,40 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.exceptions;
/**
* The class HDF5LibraryException returns errors raised by the HDF5 library.
* <p>
* This sub-class represents HDF5 major error code <b>H5E_FUNC</b>
*/
public class HDF5FunctionEntryExitException extends HDF5LibraryException {
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5FunctionEntryExitException</code> with no
* specified detail message.
*/
public HDF5FunctionEntryExitException() { super(); }
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5FunctionEntryExitException</code> with the
* specified detail message.
*
* @param s
* the detail message.
*/
public HDF5FunctionEntryExitException(String s) { super(s); }
}
@@ -0,0 +1,40 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.exceptions;
/**
* The class HDF5LibraryException returns errors raised by the HDF5 library.
* <p>
* This sub-class represents HDF5 major error code <b>H5E_HEAP</b>
*/
public class HDF5HeapException extends HDF5LibraryException {
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5HeapException</code> with no specified detail
* message.
*/
public HDF5HeapException() { super(); }
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5HeapException</code> with the specified detail
* message.
*
* @param s
* the detail message.
*/
public HDF5HeapException(String s) { super(s); }
}
@@ -0,0 +1,40 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.exceptions;
/**
* The class HDF5LibraryException returns errors raised by the HDF5 library.
* <p>
* This sub-class represents HDF5 major error code <b>H5E_ID</b>
*/
public class HDF5IdException extends HDF5LibraryException {
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5IdException</code> with no specified detail
* message.
*/
public HDF5IdException() { super(); }
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5IdException</code> with the specified detail
* message.
*
* @param s
* the detail message.
*/
public HDF5IdException(String s) { super(s); }
}
@@ -0,0 +1,40 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.exceptions;
/**
* The class HDF5LibraryException returns errors raised by the HDF5 library.
* <p>
* This sub-class represents HDF5 major error code <b>H5E_INTERNAL</b>
*/
public class HDF5InternalErrorException extends HDF5LibraryException {
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5InternalErrorException</code> with no specified
* detail message.
*/
public HDF5InternalErrorException() { super(); }
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5InternalErrorException</code> with the specified
* detail message.
*
* @param s
* the detail message.
*/
public HDF5InternalErrorException(String s) { super(s); }
}
@@ -0,0 +1,44 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.exceptions;
/**
* \page ERRORSJAVA Java Wrapper Errors and Exceptions
* The class HDF5JavaException returns errors from the Java wrapper of theHDF5
* library.
* <p>
* These errors include Java configuration errors, security violations, and
* resource exhaustion.
*
* @defgroup JERRJAVA HDF5 Library Java Exception Interface
*/
public class HDF5JavaException extends HDF5Exception {
/**
* @ingroup JERRJAVA
*
* Constructs an <code>HDF5JavaException</code> with no specified detail
* message.
*/
public HDF5JavaException() { super(); }
/**
* @ingroup JERRJAVA
*
* Constructs an <code>HDF5JavaException</code> with the specified detail
* message.
*
* @param s
* the detail message.
*/
public HDF5JavaException(String s) { super(s); }
}
@@ -0,0 +1,411 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.exceptions;
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
/**
* \page ERRORSLIB HDF5 Library Errors and Exceptions
* The class HDF5LibraryException returns errors raised by the HDF5 library.
*
* Each major error code from the HDF5 Library is represented by a sub-class of
* this class, and by default the 'detailedMessage' is set according to the
* minor error code from the HDF5 Library.
* <p>
* For major and minor error codes, @see <b>@ref H5E</b> in the HDF5 library.
*
* @defgroup JERRLIB HDF5 Library JNI Exception Interface
*
*/
@SuppressWarnings("serial")
public class HDF5LibraryException extends HDF5Exception {
/** major error number of the first error on the HDF5 library error stack. */
private final long majorErrorNumber;
/** minor error number of the first error on the HDF5 library error stack. */
private final long minorErrorNumber;
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5LibraryException</code> with no specified detail
* message.
*/
public HDF5LibraryException()
{
super();
// this code forces the loading of the HDF5 library
// to assure that the native methods are available
try {
H5.H5open();
}
catch (Exception e) {
}
this.majorErrorNumber = _getMajorErrorNumber();
this.minorErrorNumber = _getMinorErrorNumber();
detailMessage = getMinorError(minorErrorNumber);
}
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5LibraryException</code> with the specified detail
* message.
*
* @param s
* the detail message.
*/
public HDF5LibraryException(String s)
{
super(s);
// this code forces the loading of the HDF5 library
// to assure that the native methods are available
try {
H5.H5open();
}
catch (Exception e) {
}
this.majorErrorNumber = _getMajorErrorNumber();
this.minorErrorNumber = _getMinorErrorNumber();
}
/**
* @ingroup JERRLIB
*
* Get the major error number of the first error on the HDF5 library error
* stack.
*
* @return the major error number
*/
public long getMajorErrorNumber() { return majorErrorNumber; }
private native long _getMajorErrorNumber();
/**
* @ingroup JERRLIB
*
* Get the minor error number of the first error on the HDF5 library error
* stack.
*
* @return the minor error number
*/
public long getMinorErrorNumber() { return minorErrorNumber; }
private native long _getMinorErrorNumber();
/**
* @ingroup JERRLIB
*
* Return an error message for the minor error number.
*
* These messages come from <b>@ref H5E</b>.
*
* @param err_code
* the error code
*
* @return the string of the minor error
*/
public String getMinorError(long err_code)
{
if (err_code == 0) {
return "special zero no error";
}
else if (err_code == HDF5Constants.H5E_UNINITIALIZED) {
return "information is uninitialized";
}
else if (err_code == HDF5Constants.H5E_UNSUPPORTED) {
return "feature is unsupported";
}
else if (err_code == HDF5Constants.H5E_BADTYPE) {
return "incorrect type found";
}
else if (err_code == HDF5Constants.H5E_BADRANGE) {
return "argument out of range";
}
else if (err_code == HDF5Constants.H5E_BADVALUE) {
return "bad value for argument";
}
else if (err_code == HDF5Constants.H5E_NOSPACE) {
return "no space available for allocation";
}
else if (err_code == HDF5Constants.H5E_CANTCOPY) {
return "unable to copy object";
}
else if (err_code == HDF5Constants.H5E_CANTFREE) {
return "unable to free object";
}
else if (err_code == HDF5Constants.H5E_ALREADYEXISTS) {
return "Object already exists";
}
else if (err_code == HDF5Constants.H5E_CANTLOCK) {
return "Unable to lock object";
}
else if (err_code == HDF5Constants.H5E_CANTUNLOCK) {
return "Unable to unlock object";
}
else if (err_code == HDF5Constants.H5E_FILEEXISTS) {
return "file already exists";
}
else if (err_code == HDF5Constants.H5E_FILEOPEN) {
return "file already open";
}
else if (err_code == HDF5Constants.H5E_CANTCREATE) {
return "Can't create file";
}
else if (err_code == HDF5Constants.H5E_CANTOPENFILE) {
return "Can't open file";
}
else if (err_code == HDF5Constants.H5E_CANTCLOSEFILE) {
return "Can't close file";
}
else if (err_code == HDF5Constants.H5E_NOTHDF5) {
return "not an HDF5 format file";
}
else if (err_code == HDF5Constants.H5E_BADFILE) {
return "bad file ID accessed";
}
else if (err_code == HDF5Constants.H5E_TRUNCATED) {
return "file has been truncated";
}
else if (err_code == HDF5Constants.H5E_MOUNT) {
return "file mount error";
}
else if (err_code == HDF5Constants.H5E_CANTDELETEFILE) {
return "Unable to delete file";
}
else if (err_code == HDF5Constants.H5E_SEEKERROR) {
return "seek failed";
}
else if (err_code == HDF5Constants.H5E_READERROR) {
return "read failed";
}
else if (err_code == HDF5Constants.H5E_WRITEERROR) {
return "write failed";
}
else if (err_code == HDF5Constants.H5E_CLOSEERROR) {
return "close failed";
}
else if (err_code == HDF5Constants.H5E_OVERFLOW) {
return "address overflowed";
}
else if (err_code == HDF5Constants.H5E_FCNTL) {
return "file fcntl failed";
}
else if (err_code == HDF5Constants.H5E_CANTINIT) {
return "Can't initialize object";
}
else if (err_code == HDF5Constants.H5E_ALREADYINIT) {
return "object already initialized";
}
else if (err_code == HDF5Constants.H5E_CANTRELEASE) {
return "Can't release object";
}
else if (err_code == HDF5Constants.H5E_BADID) {
return "Can't find ID information";
}
else if (err_code == HDF5Constants.H5E_BADGROUP) {
return "Can't find group information";
}
else if (err_code == HDF5Constants.H5E_CANTREGISTER) {
return "Can't register new ID";
}
else if (err_code == HDF5Constants.H5E_CANTINC) {
return "Can't increment reference count";
}
else if (err_code == HDF5Constants.H5E_CANTDEC) {
return "Can't decrement reference count";
}
else if (err_code == HDF5Constants.H5E_NOIDS) {
return "Out of IDs for group";
}
else if (err_code == HDF5Constants.H5E_CANTFLUSH) {
return "Can't flush object from cache";
}
else if (err_code == HDF5Constants.H5E_CANTLOAD) {
return "Can't load object into cache";
}
else if (err_code == HDF5Constants.H5E_PROTECT) {
return "protected object error";
}
else if (err_code == HDF5Constants.H5E_NOTCACHED) {
return "object not currently cached";
}
else if (err_code == HDF5Constants.H5E_NOTFOUND) {
return "object not found";
}
else if (err_code == HDF5Constants.H5E_EXISTS) {
return "object already exists";
}
else if (err_code == HDF5Constants.H5E_CANTENCODE) {
return "Can't encode value";
}
else if (err_code == HDF5Constants.H5E_CANTDECODE) {
return "Can't decode value";
}
else if (err_code == HDF5Constants.H5E_CANTSPLIT) {
return "Can't split node";
}
else if (err_code == HDF5Constants.H5E_CANTINSERT) {
return "Can't insert object";
}
else if (err_code == HDF5Constants.H5E_CANTLIST) {
return "Can't list node";
}
else if (err_code == HDF5Constants.H5E_LINKCOUNT) {
return "bad object header link count";
}
else if (err_code == HDF5Constants.H5E_VERSION) {
return "wrong version number";
}
else if (err_code == HDF5Constants.H5E_ALIGNMENT) {
return "alignment error";
}
else if (err_code == HDF5Constants.H5E_BADMESG) {
return "unrecognized message";
}
else if (err_code == HDF5Constants.H5E_CANTDELETE) {
return "Can't delete message";
}
else if (err_code == HDF5Constants.H5E_CANTOPENOBJ) {
return "Can't open object";
}
else if (err_code == HDF5Constants.H5E_COMPLEN) {
return "name component is too long";
}
else if (err_code == HDF5Constants.H5E_LINK) {
return "link count failure";
}
else if (err_code == HDF5Constants.H5E_CANTCONVERT) {
return "Can't convert datatypes";
}
else if (err_code == HDF5Constants.H5E_BADSIZE) {
return "Bad size for object";
}
else if (err_code == HDF5Constants.H5E_CANTCLIP) {
return "Can't clip hyperslab region";
}
else if (err_code == HDF5Constants.H5E_CANTCOUNT) {
return "Can't count elements";
}
else if (err_code == HDF5Constants.H5E_CANTSELECT) {
return "Can't select hyperslab";
}
else if (err_code == HDF5Constants.H5E_CANTNEXT) {
return "Can't move to next iterator location";
}
else if (err_code == HDF5Constants.H5E_BADSELECT) {
return "Invalid selection";
}
else if (err_code == HDF5Constants.H5E_CANTGET) {
return "Can't get value";
}
else if (err_code == HDF5Constants.H5E_CANTSET) {
return "Can't set value";
}
else if (err_code == HDF5Constants.H5E_DUPCLASS) {
return "Duplicate class name in parent class";
}
else if (err_code == HDF5Constants.H5E_MPI) {
return "some MPI function failed";
}
else if (err_code == HDF5Constants.H5E_MPIERRSTR) {
return "MPI Error String";
// }
// else
// if
// (err_code
// ==
// HDF5Constants.H5E_CANTRECV
// )
// {
// return
// "can't receive messages from processes";
// }
// else
// if
// (err_code
// ==
// HDF5Constants.H5E_CANTALLOC
// )
// {
// return
// "can't allocate from file";
}
else if (err_code == HDF5Constants.H5E_NOFILTER) {
return "requested filter is not available";
}
else if (err_code == HDF5Constants.H5E_CALLBACK) {
return "callback failed";
}
else if (err_code == HDF5Constants.H5E_CANAPPLY) {
return "error from filter \"can apply\" callback";
}
else if (err_code == HDF5Constants.H5E_SETLOCAL) {
return "error from filter \"set local\" callback";
}
else {
return "undefined error(" + err_code + ")";
}
}
/**
* @ingroup JERRLIB
*
* Prints this <code>HDF5LibraryException</code>, the HDF5 Library error
* stack, and and the Java stack trace to the standard error stream.
*/
@Override
public void printStackTrace()
{
System.err.println(this);
printStackTrace0(null); // the HDF5 Library error stack
super.printStackTrace(); // the Java stack trace
}
/**
* @ingroup JERRLIB
*
* Prints this <code>HDF5LibraryException</code> the HDF5 Library error
* stack, and and the Java stack trace to the specified print stream.
*
* @param f
* the file print stream.
*/
public void printStackTrace(java.io.File f)
{
if ((f == null) || !f.exists() || f.isDirectory() || !f.canWrite()) {
printStackTrace();
}
else {
try {
java.io.FileOutputStream o = new java.io.FileOutputStream(f);
java.io.PrintWriter p = new java.io.PrintWriter(o);
p.println(this);
p.close();
}
catch (Exception ex) {
System.err.println(this);
};
// the HDF5 Library error stack
printStackTrace0(f.getPath());
super.printStackTrace(); // the Java stack trace
}
}
/*
* This private method calls the HDF5 library to extract the error codes
* and error stack.
*/
private native void printStackTrace0(String s);
}
@@ -0,0 +1,40 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.exceptions;
/**
* The class HDF5LibraryException returns errors raised by the HDF5 library.
* <p>
* This sub-class represents HDF5 major error code <b>H5E_IO</b>
*/
public class HDF5LowLevelIOException extends HDF5LibraryException {
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5LowLevelIOException</code> with no specified
* detail message.
*/
public HDF5LowLevelIOException() { super(); }
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5LowLevelIOException</code> with the specified
* detail message.
*
* @param s
* the detail message.
*/
public HDF5LowLevelIOException(String s) { super(s); }
}
@@ -0,0 +1,40 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.exceptions;
/**
* The class HDF5LibraryException returns errors raised by the HDF5 library.
* <p>
* This sub-class represents HDF5 major error code <b>H5E_CACHE</b>
*/
public class HDF5MetaDataCacheException extends HDF5LibraryException {
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5MetaDataCacheException</code> with no specified
* detail message.
*/
public HDF5MetaDataCacheException() { super(); }
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5MetaDataCacheException</code> with the specified
* detail message.
*
* @param s
* the detail message.
*/
public HDF5MetaDataCacheException(String s) { super(s); }
}
@@ -0,0 +1,40 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.exceptions;
/**
* The class HDF5LibraryException returns errors raised by the HDF5 library.
* <p>
* This sub-class represents HDF5 major error code <b>H5E_OHDR</b>
*/
public class HDF5ObjectHeaderException extends HDF5LibraryException {
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5ObjectHeaderException</code> with no specified
* detail message.
*/
public HDF5ObjectHeaderException() { super(); }
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5ObjectHeaderException</code> with the specified
* detail message.
*
* @param s
* the detail message.
*/
public HDF5ObjectHeaderException(String s) { super(s); }
}
@@ -0,0 +1,40 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.exceptions;
/**
* The class HDF5LibraryException returns errors raised by the HDF5 library.
* <p>
* This sub-class represents HDF5 major error code <b>H5E_PLIST</b>
*/
public class HDF5PropertyListInterfaceException extends HDF5LibraryException {
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5PropertyListInterfaceException</code> with no
* specified detail message.
*/
public HDF5PropertyListInterfaceException() { super(); }
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5PropertyListInterfaceException</code> with the
* specified detail message.
*
* @param s
* the detail message.
*/
public HDF5PropertyListInterfaceException(String s) { super(s); }
}
@@ -0,0 +1,40 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.exceptions;
/**
* The class HDF5LibraryException returns errors raised by the HDF5 library.
* <p>
* This sub-class represents HDF5 major error code <b>H5E_REFERENCE</b>
*/
public class HDF5ReferenceException extends HDF5LibraryException {
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5ReferenceException</code> with no specified
* detail message.
*/
public HDF5ReferenceException() { super(); }
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5ReferenceException</code> with the specified
* detail message.
*
* @param s
* the detail message.
*/
public HDF5ReferenceException(String s) { super(s); }
}
@@ -0,0 +1,40 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.exceptions;
/**
* The class HDF5LibraryException returns errors raised by the HDF5 library.
* <p>
* This sub-class represents HDF5 major error code <b>H5E_RESOURCE</b>
*/
public class HDF5ResourceUnavailableException extends HDF5LibraryException {
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5ResourceUnavailableException</code> with no
* specified detail message.
*/
public HDF5ResourceUnavailableException() { super(); }
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5FunctionArgumentException</code> with the
* specified detail message.
*
* @param s
* the detail message.
*/
public HDF5ResourceUnavailableException(String s) { super(s); }
}
@@ -0,0 +1,40 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.exceptions;
/**
* The class HDF5LibraryException returns errors raised by the HDF5 library.
* <p>
* This sub-class represents HDF5 major error code <b>H5E_SYM</b>
*/
public class HDF5SymbolTableException extends HDF5LibraryException {
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5SymbolTableException</code> with no specified
* detail message.
*/
public HDF5SymbolTableException() { super(); }
/**
* @ingroup JERRLIB
*
* Constructs an <code>HDF5SymbolTableException</code> with the specified
* detail message.
*
* @param s
* the detail message.
*/
public HDF5SymbolTableException(String s) { super(s); }
}
@@ -0,0 +1,31 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
* \page ERRORS_UG Errors and Exceptions
* <p>
* The package exceptions contains error classes for the Java HDF5 Interface.
* <p>
* There are two sub-classes of exceptions defined:
* <ol>
* <li>
* HDF5LibraryException -- errors raised the HDF5 library code
* <li>
* HDF5JavaException -- errors raised the HDF5 Java wrapper code
* </ol>
* <p>
* The HDF5LibraryException is the base class for the classes that represent specific error conditions.
* In particular, HDF5LibraryException has a sub-class for each major
* error code returned by the HDF5 library.
*
*/
package hdf.hdf5lib.exceptions;
+202
View File
@@ -0,0 +1,202 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
\page HDF5LIB_UG HDF5 Java Package
* This package is the Java interface for the HDF5 library.
* <p>
* This code is the called by Java programs to access the entry points of the HDF5 library.
* Each routine wraps a single
* HDF5 entry point, generally with the arguments and return codes analogous to the C interface.
* <p>
* For details of the HDF5 library, see the HDF5 Documentation at:
* <a href="https://support.hdfgroup.org/documentation/">https://support.hdfgroup.org/documentation/</a>
* <hr>
* <p>
* <b>Mapping of arguments for Java</b>
*
* <p>
* In general, arguments to the HDF Java API are straightforward translations from the 'C' API described
* in the HDF Reference Manual.
*
* <table border=1>
* <caption><b>HDF5 C types to Java types</b> </caption>
* <tr>
* <td><b>HDF5</b></td>
* <td><b>Java</b></td>
* </tr>
* <tr>
* <td>H5T_NATIVE_INT</td>
* <td>int, Integer</td>
* </tr>
* <tr>
* <td>H5T_NATIVE_SHORT</td>
* <td>short, Short</td>
* </tr>
* <tr>
* <td>H5T_NATIVE_FLOAT</td>
* <td>float, Float</td>
* </tr>
* <tr>
* <td>H5T_NATIVE_DOUBLE</td>
* <td>double, Double</td>
* </tr>
* <tr>
* <td>H5T_NATIVE_CHAR</td>
* <td>byte, Byte</td>
* </tr>
* <tr>
* <td>H5T_C_S1</td>
* <td>java.lang.String</td>
* </tr>
* <tr>
* <td>void * <br />
* (i.e., pointer to `Any')</td>
* <td>Special -- see HDFArray</td>
* </tr>
* </table>
* <b>General Rules for Passing Arguments and Results</b>
* <p>
* In general, arguments passed <b>IN</b> to Java are the analogous basic types, as above. The exception
* is for arrays, which are discussed below.
* <p>
* The <i>return value</i> of Java methods is also the analogous type, as above. A major exception to that
* rule is that
* all HDF functions that return SUCCEED/FAIL are declared <i>boolean</i> in the Java version, rather than
* <i>int</i> as
* in the C. Functions that return a value or else FAIL are declared the equivalent to the C function.
* However, in most
* cases the Java method will raise an exception instead of returning an error code.
* @see @ref ERRORS.
* <p>
* Java does not support pass by reference of arguments, so arguments that are returned through <b>OUT</b>
* parameters
* must be wrapped in an object or array. The Java API for HDF consistently wraps arguments in arrays.
* <p>
* For instance, a function that returns two integers is declared:
*
* <pre>
* h_err_t HDF5dummy( int *a1, int *a2)
* </pre>
*
* For the Java interface, this would be declared:
*
* <pre>
* public synchronized static native void HDF5dummy(int args[]);
* </pre>
*
* where <i>a1</i> is <i>args[0]</i> and <i>a2</i> is <i>args[1]</i>, and would be invoked:
*
* <pre>
* H5.HDF5dummy(a);
* </pre>
*
* <p>
* All the routines where this convention is used will have specific documentation of the details, given
* below.
* <p>
* <b>Arrays</b>
* <p>
* HDF5 needs to read and write multi-dimensional arrays of any number type (and records). The HDF5 API
* describes the
* layout of the source and destination, and the data for the array passed as a block of bytes, for instance,
*
* <pre>
* herr_t H5Dread(long fid, long filetype, long memtype, long memspace, void *data);
* </pre>
*
* <p>
* where ``void *'' means that the data may be any valid numeric type, and is a contiguous block of bytes that
* is the
* data for a multi-dimensional array. The other parameters describe the dimensions, rank, and datatype of the
* array on
* disk (source) and in memory (destination).
* <p>
* For Java, this ``ANY'' is a problem, as the type of data must always be declared. Furthermore,
* multidimensional
* arrays are definitely <i>not</i> laid out contiguously in memory. It would be infeasible to declare a
* separate
* routine for every combination of number type and dimensionality. For that reason, the
* <a href="./HDFArray.html"><b>HDFArray</b></a> class is used to discover the type, shape, and
* size of the
* data array at run time, and to convert to and from a contiguous array of bytes in synchronized static
* native C order.
* <p>
* The upshot is that any Java array of numbers (either primitive or sub-classes of type <b>Number</b>) can be
* passed as
* an ``Object'', and the Java API will translate to and from the appropriate packed array of bytes needed by
* the C
* library. So the function above would be declared:
*
* <pre>
* public synchronized static native int H5Dread(long fid, long filetype, long memtype, long memspace, Object
* data);
* </pre>
* OPEN_IDS.addElement(id);
* and the parameter <i>data</i> can be any multi-dimensional array of numbers, such as float[][], or
* int[][][], or
* Double[][].
* <p>
* <b>HDF5 Constants</b>
* <p>
* The HDF5 API defines a set of constants and enumerated values. Most of these values are available to Java
* programs
* via the class <a href="./HDF5Constants.html"> <b>HDF5Constants</b></a>. For example, the
* parameters for
* the h5open() call include two numeric values, <b><i>HDFConstants.H5F_ACC_RDWR</i></b> and
* <b><i>HDF5Constants.H5P_DEFAULT</i></b>. As would be expected, these numbers correspond to the C constants
* <b><i>H5F_ACC_RDWR</i></b> and <b><i>H5P_DEFAULT</i></b>.
* <p>
* The HDF5 API defines a set of values that describe number types and sizes, such as "H5T_NATIVE_INT" and
* "hsize_t".
* These values are determined at run time by the HDF5 C library. To support these parameters, the Java class
* <a href="./HDF5CDataTypes.html"> <b>HDF5CDataTypes</b></a> looks up the values when initiated.
* The values
* can be accessed as public variables of the Java class, such as:
*
* <pre>
* long data_type = HDF5CDataTypes.JH5T_NATIVE_INT;
* </pre>
*
* The Java application uses both types of constants the same way, the only difference is that the
* <b><i>HDF5CDataTypes</i></b> may have different values on different platforms.
* <p>
* <b>Error handling and Exceptions</b>
* <p>
* The HDF5 error API (H5E) manages the behavior of the error stack in the HDF5 library. This API is
* available from the
* JHI5. Errors are converted into Java exceptions. This is totally different from the C interface, but is
* very natural
* for Java programming.
* <p>
* The exceptions of the JHI5 are organized as sub-classes of the class
* <a href="./HDF5Exception.html"> <b>HDF5Exception</b></a>. There are two subclasses
* of
* <b>HDF5Exception</b>, @ref ERRORSLIB <b>HDF5LibraryException</b>
* and @ref ERRORSJAVA <b>HDF5JavaException</b>.
* The sub-classes of the former represent errors from the HDF5 C library,
* while sub-classes of the latter represent errors in the JHI5 wrapper and support code.
* <p>
* The super-class <b><i>HDF5LibraryException</i></b> implements the method
* '<b><i>printStackTrace()</i></b>', which prints out the HDF5 error stack, as described
* in the HDF5 C API <i><b>@ref H5Eprint()</b>.</i> This may be
* used by Java
* exception handlers to print out the HDF5 error stack.
* <hr>
*
* @ref HDF5LIB
*
* <b>@see: <a href="https://www.hdfgroup.org/solutions/hdf5/">HDF5"</a></b>
*
*/
package hdf.hdf5lib;
+205
View File
@@ -0,0 +1,205 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.hdfgroup</groupId>
<artifactId>hdf5-java-jni</artifactId>
<version>@HDF5_PACKAGE_VERSION@@HDF5_MAVEN_VERSION_SUFFIX@</version>
<packaging>jar</packaging>
<name>HDF5 Java JNI Bindings</name>
<description>Java Native Interface bindings for the HDF5 scientific data format library</description>
<url>https://github.com/HDFGroup/hdf5</url>
<licenses>
<license>
<name>BSD-style License</name>
<url>https://github.com/HDFGroup/hdf5/blob/develop/LICENSE</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<organization>The HDF Group</organization>
<organizationUrl>https://www.hdfgroup.org</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/HDFGroup/hdf5.git</connection>
<developerConnection>scm:git:git@github.com:HDFGroup/hdf5.git</developerConnection>
<url>https://github.com/HDFGroup/hdf5</url>
<tag>@HDF5_PACKAGE_VERSION@</tag>
</scm>
<issueManagement>
<system>GitHub</system>
<url>https://github.com/HDFGroup/hdf5/issues</url>
</issueManagement>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<hdf5.version>@HDF5_PACKAGE_VERSION@</hdf5.version>
<hdf5.platform>@HDF5_MAVEN_PLATFORM@</hdf5.platform>
<hdf5.architecture>@HDF5_MAVEN_ARCHITECTURE@</hdf5.architecture>
<hdf5.java.implementation>JNI</hdf5.java.implementation>
<hdf5.java.minimum.version>11</hdf5.java.minimum.version>
</properties>
<dependencies>
<!-- SLF4J API for logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.16</version>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}-${project.version}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>11</source>
<target>11</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
<manifestEntries>
<Enable-Native-Access>ALL-UNNAMED</Enable-Native-Access>
<HDF5-Version>${hdf5.version}</HDF5-Version>
<HDF5-Platform>${hdf5.platform}</HDF5-Platform>
<HDF5-Architecture>${hdf5.architecture}</HDF5-Architecture>
<HDF5-Java-Implementation>${hdf5.java.implementation}</HDF5-Java-Implementation>
<HDF5-Java-Minimum-Version>${hdf5.java.minimum.version}</HDF5-Java-Minimum-Version>
<Build-Time>@CMAKE_CONFIGURE_DATE@</Build-Time>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<source>11</source>
<failOnError>false</failOnError>
<quiet>true</quiet>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<!-- Platform-specific profiles for native library inclusion -->
<profile>
<id>linux-x86_64</id>
<activation>
<property>
<name>hdf5.platform</name>
<value>linux-x86_64</value>
</property>
</activation>
<properties>
<classifier>linux-x86_64</classifier>
</properties>
</profile>
<profile>
<id>windows-x86_64</id>
<activation>
<property>
<name>hdf5.platform</name>
<value>windows-x86_64</value>
</property>
</activation>
<properties>
<classifier>windows-x86_64</classifier>
</properties>
</profile>
<profile>
<id>macos-x86_64</id>
<activation>
<property>
<name>hdf5.platform</name>
<value>macos-x86_64</value>
</property>
</activation>
<properties>
<classifier>macos-x86_64</classifier>
</properties>
</profile>
<profile>
<id>macos-aarch64</id>
<activation>
<property>
<name>hdf5.platform</name>
<value>macos-aarch64</value>
</property>
</activation>
<properties>
<classifier>macos-aarch64</classifier>
</properties>
</profile>
<!-- Development snapshot profile -->
<profile>
<id>snapshot</id>
<activation>
<property>
<name>maven.deploy.snapshot</name>
<value>true</value>
</property>
</activation>
<properties>
<hdf5.version.suffix>-SNAPSHOT</hdf5.version.suffix>
</properties>
</profile>
</profiles>
</project>
@@ -0,0 +1,330 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.structs;
import java.io.Serializable;
/**
* Information struct for H5Pget_mdc_config/H5Pset_mdc_config
*
*/
public class H5AC_cache_config_t implements Serializable {
private static final long serialVersionUID = -6748085696476149972L;
// general configuration fields
/**
* version: Integer field containing the version number of this version
* of the H5AC_cache_config_t structure. Any instance of
* H5AC_cache_config_t passed to the cache must have a known
* version number, or an error will be flagged.
*/
public int version;
/**
* rpt_fcn_enabled: Boolean field used to enable and disable the default
* reporting function. This function is invoked every time the
* automatic cache resize code is run, and reports on its activities.
*
* This is a debugging function, and should normally be turned off.
*/
public boolean rpt_fcn_enabled;
/**
* open_trace_file: Boolean field indicating whether the trace_file_name
* field should be used to open a trace file for the cache.
*
* *** DEPRECATED *** Use H5Fstart/stop logging functions instead
*/
public boolean open_trace_file;
/**
* close_trace_file: Boolean field indicating whether the current trace
* file (if any) should be closed.
*
* *** DEPRECATED *** Use H5Fstart/stop logging functions instead
*/
public boolean close_trace_file;
/**
* trace_file_name: Full path of the trace file to be opened if the
* open_trace_file field is TRUE.
*
* *** DEPRECATED *** Use H5Fstart/stop logging functions instead
*/
public String trace_file_name;
/**
* evictions_enabled: Boolean field used to either report the current
* evictions enabled status of the cache, or to set the cache's
* evictions enabled status.
*/
public boolean evictions_enabled;
/**
* set_initial_size: Boolean flag indicating whether the size of the
* initial size of the cache is to be set to the value given in
* the initial_size field. If set_initial_size is FALSE, the
* initial_size field is ignored.
*/
public boolean set_initial_size;
/**
* initial_size: If enabled, this field contain the size the cache is
* to be set to upon receipt of this structure. Needless to say,
* initial_size must lie in the closed interval [min_size, max_size].
*/
public long initial_size;
/**
* min_clean_fraction: double in the range 0 to 1 indicating the fraction
* of the cache that is to be kept clean. This field is only used
* in parallel mode. Typical values are 0.1 to 0.5.
*/
public double min_clean_fraction;
/**
* max_size: Maximum size to which the cache can be adjusted. The
* supplied value must fall in the closed interval
* [MIN_MAX_CACHE_SIZE, MAX_MAX_CACHE_SIZE]. Also, max_size must
* be greater than or equal to min_size.
*/
public long max_size;
/**
* min_size: Minimum size to which the cache can be adjusted. The
* supplied value must fall in the closed interval
* [H5C__MIN_MAX_CACHE_SIZE, H5C__MAX_MAX_CACHE_SIZE]. Also, min_size
* must be less than or equal to max_size.
*/
public long min_size;
/**
* epoch_length: Number of accesses on the cache over which to collect
* hit rate stats before running the automatic cache resize code,
* if it is enabled.
*/
public long epoch_length;
// size increase control fields
/**
* incr_mode: Instance of the H5C_cache_incr_mode enumerated type whose
* value indicates how we determine whether the cache size should be
* increased. At present there are two possible values.
*/
public int incr_mode;
/**
* lower_hr_threshold: Lower hit rate threshold. If the increment mode
* (incr_mode) is H5C_incr__threshold and the hit rate drops below the
* value supplied in this field in an epoch, increment the cache size by
* size_increment. Note that cache size may not be incremented above
* max_size, and that the increment may be further restricted by the
* max_increment field if it is enabled.
*/
public double lower_hr_threshold;
/**
* increment: Double containing the multiplier used to derive the new
* cache size from the old if a cache size increment is triggered.
* The increment must be greater than 1.0, and should not exceed 2.0.
*/
public double increment;
/**
* apply_max_increment: Boolean flag indicating whether the max_increment
* field should be used to limit the maximum cache size increment.
*/
public boolean apply_max_increment;
/**
* max_increment: If enabled by the apply_max_increment field described
* above, this field contains the maximum number of bytes by which the
* cache size can be increased in a single re-size.
*/
public long max_increment;
/**
* flash_incr_mode: Instance of the H5C_cache_flash_incr_mode enumerated
* type whose value indicates whether and by which algorithm we should
* make flash increases in the size of the cache to accommodate insertion
* of large entries and large increases in the size of a single entry.
*/
public int flash_incr_mode;
/**
* flash_multiple: Double containing the multiple described above in the
* H5C_flash_incr__add_space section of the discussion of the
* flash_incr_mode section. This field is ignored unless flash_incr_mode
* is H5C_flash_incr__add_space.
*/
public double flash_multiple;
/**
* flash_threshold: Double containing the factor by which current max cache
* size is multiplied to obtain the size threshold for the add_space flash
* increment algorithm. The field is ignored unless flash_incr_mode is
* H5C_flash_incr__add_space.
*/
public double flash_threshold;
// size decrease control fields
/**
* decr_mode: Instance of the H5C_cache_decr_mode enumerated type whose
* value indicates how we determine whether the cache size should be
* decreased. At present there are four possibilities.
*/
public int decr_mode;
/**
* upper_hr_threshold: Upper hit rate threshold. The use of this field
* varies according to the current decr_mode.
*/
public double upper_hr_threshold;
/**
* decrement: This field is only used when the decr_mode is
* H5C_decr__threshold.
*/
public double decrement;
/**
* apply_max_decrement: Boolean flag used to determine whether decrements
* in cache size are to be limited by the max_decrement field.
*/
public boolean apply_max_decrement;
/**
* max_decrement: Maximum number of bytes by which the cache size can be
* decreased in a single re-size. Note that decrements may also be
* restricted by the min_size of the cache, and (in age out modes) by
* the empty_reserve field.
*/
public long max_decrement;
/**
* epochs_before_eviction: Integer field used in H5C_decr__age_out and
* H5C_decr__age_out_with_threshold decrement modes.
*/
public int epochs_before_eviction;
/**
* apply_empty_reserve: Boolean field controlling whether the empty_reserve
* field is to be used in computing the new cache size when the
* decr_mode is H5C_decr__age_out or H5C_decr__age_out_with_threshold.
*/
public boolean apply_empty_reserve;
/**
* empty_reserve: To avoid a constant racheting down of cache size by small
* amounts in the H5C_decr__age_out and H5C_decr__age_out_with_threshold
* modes, this field allows one to require that any cache size
* reductions leave the specified fraction of unused space in the cache.
*/
public double empty_reserve;
// parallel configuration fields
/**
* dirty_bytes_threshold: Threshold of dirty byte creation used to
* synchronize updates between caches.
*/
public long dirty_bytes_threshold;
/**
* metadata_write_strategy: Integer field containing a code indicating the
* desired metadata write strategy.
*/
public int metadata_write_strategy;
/**
* H5AC_cache_config_t is a public structure intended for use in public APIs.
* At least in its initial incarnation, it is basically a copy of struct
* H5C_auto_size_ctl_t, minus the report_fcn field, and plus the
* dirty_bytes_threshold field.
*
* @param version: Integer field containing the version number of this version
* @param rpt_fcn_enabled: Boolean field used to enable and disable the default reporting function.
* @param open_trace_file: Boolean field indicating whether the trace_file_name
* field should be used to open a trace file for the cache.
* @param close_trace_file: Boolean field indicating whether the current trace
* file (if any) should be closed.
* @param trace_file_name: Full path of the trace file to be opened if the
* open_trace_file field is TRUE.
* @param evictions_enabled: Boolean field used to either report or set the current
* evictions enabled status of the cache.
* @param set_initial_size: Boolean flag indicating whether the size of the
* initial size of the cache is to be set to the value given in
* the initial_size field.
* @param initial_size: If enabled, this field contain the size the cache is
* to be set to upon receipt of this structure.
* @param min_clean_fraction: double in the range 0 to 1 indicating the fraction
* of the cache that is to be kept clean.
* @param max_size: Maximum size to which the cache can be adjusted.
* @param min_size: Minimum size to which the cache can be adjusted.
* @param epoch_length: Number of accesses on the cache over which to collect
* hit rate stats before running the automatic cache resize code.
* @param incr_mode: Instance of the H5C_cache_incr_mode enumerated type.
* @param lower_hr_threshold: Lower hit rate threshold.
* @param increment: Double containing the multiplier used to derive the new
* cache size from the old if a cache size increment is triggered.
* @param apply_max_increment: Boolean flag indicating whether the max_increment
* field should be used to limit the maximum cache size increment.
* @param max_increment: If enabled by the apply_max_increment field described
* above, this field contains the maximum number of bytes by which the
* cache size can be increased in a single re-size.
* @param flash_incr_mode: Instance of the H5C_cache_flash_incr_mode enumerated
* type whose value indicates whether and by which algorithm we should
* make flash increases in the size of the cache to accommodate insertion
* of large entries and large increases in the size of a single entry.
* @param flash_multiple: Double containing the multiple described above in the
* H5C_flash_incr__add_space section of the discussion of the
* flash_incr_mode section.
* @param flash_threshold: Double containing the factor by which current max cache
* size is multiplied to obtain the size threshold for the add_space flash
* increment algorithm.
* @param decr_mode: Instance of the H5C_cache_decr_mode enumerated type whose
* value indicates how we determine whether the cache size should be
* decreased.
* @param upper_hr_threshold: Upper hit rate threshold. The use of this field
* varies according to the current decr_mode.
* @param decrement: This field is only used when the decr_mode is
* H5C_decr__threshold.
* @param apply_max_decrement: Boolean flag used to determine whether decrements
* in cache size are to be limited by the max_decrement field.
* @param max_decrement: Maximum number of bytes by which the cache size can be
* decreased in a single re-size.
* @param epochs_before_eviction: Integer field used in H5C_decr__age_out and
* H5C_decr__age_out_with_threshold decrement modes.
* @param apply_empty_reserve: Boolean field controlling whether the empty_reserve
* field is to be used in computing the new cache size when the
* decr_mode is H5C_decr__age_out or H5C_decr__age_out_with_threshold.
* @param empty_reserve: To avoid a constant racheting down of cache size by small
* amounts in the H5C_decr__age_out and H5C_decr__age_out_with_threshold
* modes.
* @param dirty_bytes_threshold: Threshold of dirty byte creation used to
* synchronize updates between caches.
* @param metadata_write_strategy: Integer field containing a code indicating the
* desired metadata write strategy.
*/
public H5AC_cache_config_t(int version, boolean rpt_fcn_enabled, boolean open_trace_file,
boolean close_trace_file, String trace_file_name, boolean evictions_enabled,
boolean set_initial_size, long initial_size, double min_clean_fraction,
long max_size, long min_size, long epoch_length, int incr_mode,
double lower_hr_threshold, double increment, boolean apply_max_increment,
long max_increment, int flash_incr_mode, double flash_multiple,
double flash_threshold, int decr_mode, double upper_hr_threshold,
double decrement, boolean apply_max_decrement, long max_decrement,
int epochs_before_eviction, boolean apply_empty_reserve, double empty_reserve,
long dirty_bytes_threshold, int metadata_write_strategy)
{
this.version = version;
this.rpt_fcn_enabled = rpt_fcn_enabled;
this.open_trace_file = open_trace_file;
this.close_trace_file = close_trace_file;
this.trace_file_name = trace_file_name;
this.evictions_enabled = evictions_enabled;
this.set_initial_size = set_initial_size;
this.initial_size = initial_size;
this.min_clean_fraction = min_clean_fraction;
this.max_size = max_size;
this.min_size = min_size;
this.epoch_length = epoch_length;
this.incr_mode = incr_mode;
this.lower_hr_threshold = lower_hr_threshold;
this.increment = increment;
this.apply_max_increment = apply_max_increment;
this.max_increment = flash_incr_mode;
this.flash_incr_mode = flash_incr_mode;
this.flash_multiple = flash_multiple;
this.flash_threshold = flash_threshold;
this.decr_mode = decr_mode;
this.upper_hr_threshold = upper_hr_threshold;
this.decrement = decrement;
this.apply_max_decrement = apply_max_decrement;
this.max_decrement = max_decrement;
this.epochs_before_eviction = epochs_before_eviction;
this.apply_empty_reserve = apply_empty_reserve;
this.empty_reserve = empty_reserve;
this.dirty_bytes_threshold = dirty_bytes_threshold;
this.metadata_write_strategy = metadata_write_strategy;
}
}
@@ -0,0 +1,39 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.structs;
import java.io.Serializable;
/**
* Information struct for Attribute (For H5Aget_info/H5Aget_info_by_idx/H5Aget_info_by_name)
*
*/
public class H5A_info_t implements Serializable {
private static final long serialVersionUID = 2791443594041667613L;
/** Indicate if creation order is valid */
public boolean corder_valid;
/** Creation order of attribute */
public long corder;
/** Character set of attribute name */
public int cset;
/** Size of raw data */
public long data_size;
H5A_info_t(boolean corder_valid, long corder, int cset, long data_size)
{
this.corder_valid = corder_valid;
this.corder = corder;
this.cset = cset;
this.data_size = data_size;
}
}
@@ -0,0 +1,49 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.structs;
import java.io.Serializable;
/**
* Information struct for Attribute (For H5Ewalk)
*
*/
public class H5E_error2_t implements Serializable {
private static final long serialVersionUID = 279144359041667613L;
/** class ID */
public long cls_id;
/** major error ID */
public long maj_num;
/** minor error number */
public long min_num;
/** line in file where error occurs */
public int line;
/** function in which error occurred */
public String func_name;
/** file in which error occurred */
public String file_name;
/** optional supplied description */
public String desc;
H5E_error2_t(long cls_id, long maj_num, long min_num, int line, String func_name, String file_name,
String desc)
{
this.cls_id = cls_id;
this.maj_num = maj_num;
this.min_num = min_num;
this.line = line;
this.func_name = func_name;
this.file_name = file_name;
this.desc = desc;
}
}
@@ -0,0 +1,110 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.structs;
import java.io.Serializable;
/**
* Java representation of the HDFS VFD file access property list (fapl)
* structure.
*
* Used for the access of files hosted on the Hadoop Distributed File System.
*/
public class H5FD_hdfs_fapl_t implements Serializable {
private static final long serialVersionUID = 2072473407027648309L;
/** Version number of the H5FD_hdfs_fapl_t structure. */
private int version;
/** Name of "Name Node" to access as the HDFS server. */
private String namenode_name;
/** Port number to use to connect with Name Node. */
private int namenode_port;
/** Username to use when accessing file. */
private String user_name;
/** Path to the location of the Kerberos authentication cache. */
private String kerberos_ticket_cache;
/** Size (in bytes) of the file read stream buffer. */
private int stream_buffer_size;
/**
* Create a fapl_t structure with the specified components.
* @param namenode_name
* Name of "Name Node" to access as the HDFS server.
* @param namenode_port
* Port number to use to connect with Name Node.
* @param user_name
* Username to use when accessing file.
* @param kerberos_ticket_cache
* Path to the location of the Kerberos authentication cache.
* @param stream_buffer_size
* Size (in bytes) of the file read stream buffer.
*/
public H5FD_hdfs_fapl_t(String namenode_name, int namenode_port, String user_name,
String kerberos_ticket_cache, int stream_buffer_size)
{
this.version = 1;
this.namenode_name = namenode_name;
this.namenode_port = namenode_port;
this.user_name = user_name;
this.kerberos_ticket_cache = kerberos_ticket_cache;
this.stream_buffer_size = stream_buffer_size;
}
@Override
public boolean equals(Object o)
{
if (o == null)
return false;
if (!(o instanceof H5FD_hdfs_fapl_t))
return false;
H5FD_hdfs_fapl_t other = (H5FD_hdfs_fapl_t)o;
if (this.version != other.version)
return false;
if (!this.namenode_name.equals(other.namenode_name))
return false;
if (this.namenode_port != other.namenode_port)
return false;
if (!this.user_name.equals(other.user_name))
return false;
if (!this.kerberos_ticket_cache.equals(other.kerberos_ticket_cache))
return false;
if (this.stream_buffer_size != other.stream_buffer_size)
return false;
return true;
}
@Override
public int hashCode()
{
/* this is a _very bad_ hash algorithm for purposes of hashing! */
/* implemented to satisfy the "contract" regarding equality */
int k = (int)this.version;
k += this.namenode_name.length();
k += this.user_name.length();
k += this.kerberos_ticket_cache.length();
k += namenode_port;
k += stream_buffer_size;
return k;
}
@Override
public String toString()
{
return "H5FD_hdfs_fapl_t (Version: " + this.version + ") {"
+ "\n namenode_name: '" + this.namenode_name + "'\n namenode_port: " + this.namenode_port +
"\n user_name: '" + this.user_name + "'\n kerberos_ticket_cache: '" +
this.kerberos_ticket_cache + "'\n stream_buffer_size: " + this.stream_buffer_size + "\n}\n";
}
}
@@ -0,0 +1,127 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.structs;
import java.io.Serializable;
/**
* Java representation of the ROS3 VFD file access property list (fapl)
* structure.
*
* Used for the access of files hosted remotely on S3 by Amazon.
*
* For simplicity, implemented assuming that all ROS3 fapls have components:
* - version
* - authenticate
* - aws_region
* - secret_id
* - secret_key
*
* Future implementations may be created to enable different fapl "shapes"
* depending on provided version.
*
* proposed:
*
* H5FD_ros3_fapl_t (super class, has only version field)
* H5FD_ros3_fapl_v1_t (extends super with Version 1 components)
* H5FD_ros3_fapl_v2_t (extends super with Version 2 components)
* and so on, for each version
*
* "super" is passed around, and is version-checked and re-cast as
* appropriate
*/
public class H5FD_ros3_fapl_t implements Serializable {
private static final long serialVersionUID = 8985533001471224030L;
/** Version number of the H5FD_ros3_fapl_t structure */
private int version;
/** Flag TRUE or FALSE whether or not requests are to be authenticated with the AWS4 algorithm. */
private boolean authenticate;
/** region "aws region" for authenticating request */
private String aws_region;
/** id "secret id" or "access id" for authenticating request */
private String secret_id;
/** key "secret key" or "access key" for authenticating request */
private String secret_key;
/**
* Create a "default" fapl_t structure, for anonymous access.
*/
public H5FD_ros3_fapl_t()
{
/* H5FD_ros3_fapl_t("", "", ""); */ /* defer */
this.version = 1;
this.aws_region = "";
this.secret_id = "";
this.secret_key = "";
}
/**
* Create a fapl_t structure with the specified components.
* If all are the empty string, is anonymous (non-authenticating).
* Region and ID must both be supplied for authentication.
*
* @param region "aws region" for authenticating request
* @param id "secret id" or "access id" for authenticating request
* @param key "secret key" or "access key" for authenticating request
*/
public H5FD_ros3_fapl_t(String region, String id, String key)
{
this.version = 1; /* must equal H5FD_CURR_ROS3_FAPL_T_VERSION */
/* as found in H5FDros3.h */
this.aws_region = region;
this.secret_id = id;
this.secret_key = key;
}
@Override
public boolean equals(Object o)
{
if (o == null)
return false;
if (!(o instanceof H5FD_ros3_fapl_t))
return false;
H5FD_ros3_fapl_t other = (H5FD_ros3_fapl_t)o;
if (this.version != other.version)
return false;
if (!this.aws_region.equals(other.aws_region))
return false;
if (!this.secret_key.equals(other.secret_key))
return false;
if (!this.secret_id.equals(other.secret_id))
return false;
return true;
}
@Override
public int hashCode()
{
/* this is a _very bad_ hash algorithm for purposes of hashing! */
/* implemented to satisfy the "contract" regarding equality */
int k = (int)this.version;
k += this.aws_region.length();
k += this.secret_id.length();
k += this.secret_key.length();
return k;
}
@Override
public String toString()
{
return "H5FD_ros3_fapl_t (Version:" + this.version + ") {"
+ "\n aws_region : " + this.aws_region + "\n secret_id : " + this.secret_id +
"\n secret_key : " + this.secret_key + "\n}\n";
}
}
@@ -0,0 +1,68 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.structs;
import java.io.Serializable;
/**
* Information struct for object (for H5Fget_info)
*
*/
public class H5F_info2_t implements Serializable {
private static final long serialVersionUID = 4691681162544054518L;
/** Superblock version number */
public int super_version;
/** Superblock size */
public long super_size;
/** Superblock extension size */
public long super_ext_size;
/** Version number of file free space management */
public int free_version;
/** Free space manager metadata size */
public long free_meta_size;
/** Amount of free space in the file */
public long free_tot_space;
/** Version number of shared object header info */
public int sohm_version;
/** Shared object header message header size */
public long sohm_hdr_size;
/** Shared object header message index and heap size */
public H5_ih_info_t sohm_msgs_info;
/**
* Constructor for current "global" information about file
* @param super_version: Superblock version number
* @param super_size: Superblock size
* @param super_ext_size: Superblock extension size
* @param free_version: Version number of file free space management
* @param free_meta_size: Free space manager metadata size
* @param free_tot_space: Amount of free space in the file
* @param sohm_version: Version number of shared object header info
* @param sohm_hdr_size: Shared object header message header size
* @param sohm_msgs_info: Shared object header message index and heap size
*/
public H5F_info2_t(int super_version, long super_size, long super_ext_size, int free_version,
long free_meta_size, long free_tot_space, int sohm_version, long sohm_hdr_size,
H5_ih_info_t sohm_msgs_info)
{
this.super_version = super_version;
this.super_size = super_size;
this.super_ext_size = super_ext_size;
this.free_version = free_version;
this.free_meta_size = free_meta_size;
this.free_tot_space = free_tot_space;
this.sohm_version = sohm_version;
this.sohm_hdr_size = sohm_hdr_size;
this.sohm_msgs_info = sohm_msgs_info;
}
}
@@ -0,0 +1,31 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.structs;
import java.io.Serializable;
/**
* Information struct for group (for H5Gget_info/H5Gget_info_by_name/H5Gget_info_by_idx)
*
*/
public class H5G_info_t implements Serializable {
private static final long serialVersionUID = -3746463015312132912L;
/** Type of storage for links in group */
public int storage_type;
/** Number of links in group */
public long nlinks;
/** Current max. creation order value for group */
public long max_corder;
/** Whether group has a file mounted on it */
public boolean mounted;
}
@@ -0,0 +1,59 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.structs;
import java.io.Serializable;
import hdf.hdf5lib.HDF5Constants;
/**
* Information struct for link (for H5Lget_info/H5Lget_info_by_idx)
*
*/
public class H5L_info_t implements Serializable {
private static final long serialVersionUID = -4754320605310155033L;
/** Type of link */
public int type;
/** Indicate if creation order is valid */
public boolean corder_valid;
/** Creation order */
public long corder;
/** Character set of link name */
public int cset;
/** Character set of link name */
public H5O_token_t token;
/** Size of a soft link or user-defined link value */
public long val_size;
/** Constructor for using object token portion of C union */
H5L_info_t(int type, boolean corder_valid, long corder, int cset, H5O_token_t token)
{
this.type = type;
this.corder_valid = corder_valid;
this.corder = corder;
this.cset = cset;
this.token = token;
this.val_size = -1;
}
/** Constructor for using val_size portion of C union */
H5L_info_t(int type, boolean corder_valid, long corder, int cset, long val_size)
{
this.type = type;
this.corder_valid = corder_valid;
this.corder = corder;
this.cset = cset;
this.token = HDF5Constants.H5O_TOKEN_UNDEF;
this.val_size = val_size;
}
}
@@ -0,0 +1,93 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.structs;
import java.io.Serializable;
/**
* Information struct for object header metadata (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx)
*
*/
public class H5O_hdr_info_t implements Serializable {
private static final long serialVersionUID = 7883826382952577189L;
/** Version number of header format in file */
public int version;
/** Number of object header messages */
public int nmesgs;
/** Number of object header chunks */
public int nchunks;
/** Object header status flags */
public int flags;
/** Total space for storing object header in file */
public long space_total;
/** Space within header for object header metadata information */
public long space_meta;
/** Space within header for actual message information */
public long space_mesg;
/** Free space within object header */
public long space_free;
/** Flags to indicate presence of message type in header */
public long mesg_present;
/** Flags to indicate message type is shared in header */
public long mesg_shared;
H5O_hdr_info_t(int version, int nmesgs, int nchunks, int flags, long space_total, long space_meta,
long space_mesg, long space_free, long mesg_present, long mesg_shared)
{
this.version = version;
this.nmesgs = nmesgs;
this.nchunks = nchunks;
this.flags = flags;
this.space_total = space_total;
this.space_meta = space_meta;
this.space_mesg = space_mesg;
this.space_free = space_free;
this.mesg_present = mesg_present;
this.mesg_shared = mesg_shared;
}
@Override
public boolean equals(Object o)
{
if (this == o)
return true;
if (!(o instanceof H5O_hdr_info_t))
return false;
H5O_hdr_info_t info = (H5O_hdr_info_t)o;
if (this.version != info.version)
return false;
if (this.nmesgs != info.nmesgs)
return false;
if (this.nchunks != info.nchunks)
return false;
if (this.flags != info.flags)
return false;
if (this.space_total != info.space_total)
return false;
if (this.space_meta != info.space_meta)
return false;
if (this.space_mesg != info.space_mesg)
return false;
if (this.space_free != info.space_free)
return false;
if (this.mesg_present != info.mesg_present)
return false;
if (this.mesg_shared != info.mesg_shared)
return false;
return true;
}
}
@@ -0,0 +1,68 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.structs;
import java.io.Serializable;
/**
* Information struct for object (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx)
*
*/
public class H5O_info_t implements Serializable {
private static final long serialVersionUID = 4691681163544054518L;
/** File number that object is located in */
public long fileno;
/** Object token in file */
public H5O_token_t token;
/** Basic object type (group, dataset, etc.) */
public int type;
/** Reference count of object */
public int rc;
/** Access time */
public long atime;
/** Modification time */
public long mtime;
/** Change time */
public long ctime;
/** Birth time */
public long btime;
/** Number of attributes attached to object */
public long num_attrs;
/**
* Constructor for data model information struct for objects
*
* @param fileno: File number that object is located in
* @param token: Object token in file
* @param type: Basic object type
* @param rc: Reference count of object
* @param atime: Access time
* @param mtime: Modification time
* @param ctime: Change time
* @param btime: Birth time
* @param num_attrs: Number of attributes attached to object
*/
public H5O_info_t(long fileno, H5O_token_t token, int type, int rc, long atime, long mtime, long ctime,
long btime, long num_attrs)
{
this.fileno = fileno;
this.token = token;
this.type = type;
this.rc = rc;
this.atime = atime;
this.mtime = mtime;
this.ctime = ctime;
this.btime = btime;
this.num_attrs = num_attrs;
}
}
@@ -0,0 +1,57 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.structs;
import java.io.Serializable;
/**
* Information struct for native HDF5 object info, such as object header metadata (for
* H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx).
*
*/
public class H5O_native_info_t implements Serializable {
private static final long serialVersionUID = 7883826382952577189L;
/** Object header information */
public H5O_hdr_info_t hdr_info;
/* Extra metadata storage for obj & attributes */
/** v1/v2 B-tree and local/fractal heap for groups, B-tree for chunked datasets */
public H5_ih_info_t obj_info;
/** v2 B-tree and heap for attributes */
public H5_ih_info_t attr_info;
H5O_native_info_t(H5O_hdr_info_t oheader_info, H5_ih_info_t obj_info, H5_ih_info_t attr_info)
{
this.hdr_info = oheader_info;
this.obj_info = obj_info;
this.attr_info = attr_info;
}
@Override
public boolean equals(Object o)
{
if (this == o)
return true;
if (!(o instanceof H5O_native_info_t))
return false;
H5O_native_info_t info = (H5O_native_info_t)o;
if (!this.hdr_info.equals(info.hdr_info) || !this.obj_info.equals(info.obj_info) ||
!this.attr_info.equals(info.attr_info))
return false;
return true;
}
}
@@ -0,0 +1,55 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.structs;
import java.io.Serializable;
import java.util.Arrays;
import hdf.hdf5lib.HDF5Constants;
/**
* Object token, which is a unique and permanent identifier, for an HDF5 object within a container.
*
*/
public class H5O_token_t implements Serializable {
private static final long serialVersionUID = -4754320605310155032L;
/**
* Tokens are unique and permanent identifiers that are
* used to reference HDF5 objects in a container.
* Use basic byte array to store the dat
*/
public byte[] data;
H5O_token_t(byte[] data) { this.data = data; }
/**
* Check if token data is undefined
*
* @return true if token data is undefined
*/
public boolean isUndefined() { return this.equals(HDF5Constants.H5O_TOKEN_UNDEF); }
@Override
public boolean equals(Object o)
{
if (this == o)
return true;
if (!(o instanceof H5O_token_t))
return false;
H5O_token_t token = (H5O_token_t)o;
return Arrays.equals(this.data, token.data);
}
}
@@ -0,0 +1,52 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package hdf.hdf5lib.structs;
import java.io.Serializable;
/**
* Information struct for group (for H5Gget_info/H5Gget_info_by_name/H5Gget_info_by_idx)
*
*/
public class H5_ih_info_t implements Serializable {
private static final long serialVersionUID = -142238015615462707L;
/** btree and/or list size of index */
public long index_size;
/** btree and/or list size of hp */
public long heap_size;
H5_ih_info_t(long index_size, long heap_size)
{
this.index_size = index_size;
this.heap_size = heap_size;
}
@Override
public boolean equals(Object o)
{
if (this == o)
return true;
if (!(o instanceof H5_ih_info_t))
return false;
H5_ih_info_t info = (H5_ih_info_t)o;
if (this.index_size != info.index_size)
return false;
if (this.heap_size != info.heap_size)
return false;
return true;
}
}
@@ -0,0 +1,17 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
* All structure definitions define java equivalents of the C structures needed
* by the C API calls. See the C API for information about the structures.
*/
package hdf.hdf5lib.structs;
+96
View File
@@ -0,0 +1,96 @@
<body>
<h1>Java HDF5 Interface (JHI5)</h1>
<h2><u>What it is</u></h2>
The <b>Java HD5 Interface (JHI5)</b> is a Java package
(<a href="./hdf/hdf5lib/package-summary.html">hdf.hdf5lib</a>)
that ``wraps around'' the HDF5 library.
<p>There are a large number of functions in the HDF5
library (version 1.14). Some of the functions are not supported in JHI5. Most
of the unsupported functions have C function pointers, which is not currently
implemented in JHI5.</p>
<table style="width:71%;text-align:center;background-color:#dbeaf5" border="1">
<caption>Java HDF5 Interface (JHI5)</caption>
<tr>
<td style="text-align:center;">
Note: The JHI5 does not support HDF4 or earlier.
</td>
</tr>
</table>
<p>The JHI5 may be used by any Java application that needs to access HDF5
files. It is extremely important to emphasize that <i>this package is not
a pure Java implementation of the HDF5 library.</i> The JHI5 calls the
same HDF5 library that is used by C or FORTRAN programs. (Note that this
product cannot be used in most network browsers because it accesses the
local disk using native code.)
<p>The Java HDF5 Interface consists of Java classes and a dynamically
linked native library. The Java classes declare native methods, and the
library contains C functions which implement the native methods. The C
functions call the standard HDF5 library, which is linked as part of the
same library on most platforms.
<p>The central part of the JHI5 is the Java class <i>
<a href="./hdf/hdf5lib/H5.html">hdf.hdf5lib.H5</a></i>.
The <i>H5 </i>class calls the standard (<i>i.e.</i>, `native' code) HDF5
library, with native methods for most of the HDF5 functions.
<h3>
<u>How to use it</u></h3>
The JHI5 is used by Java classes to call the HDF5 library, in order to
create HDF5 files, and read and write data in existing HDF5 files.
<p>For example, the HDF5 library has the function <b>H5Fopen</b> to open
an HDF5 file. The Java interface is the class <i>
<a href="./hdf/hdf5lib/H5.html">hdf.hdf5lib.H5</a></i>,
which has a method:
<pre><b>static native int H5Fopen(String filename, int flags, int access );</b></pre>
The native method is implemented in C using the
<a href="https://docs.oracle.com/en/java/javase/18/docs/specs/jni/index.html">Java
Native Method Interface </a>(JNI). This is written something like the following:
<pre><b>JNIEXPORT jlong
JNICALL Java_hdf_hdf5lib_H5_H5Fopen
(
&nbsp;JNIEnv *env,
&nbsp;jclass class,
&nbsp;jstring hdfFile,
&nbsp;jint flags,
&nbsp;jlong access)
&nbsp;{
&nbsp;/* ...convert Java String to (char *) */
&nbsp;/* call the HDF library */
&nbsp;retVal = H5Fopen((char *)file, (unsigned)flags, (hid_t)access);
&nbsp;/* ... */
}</b></pre>
This C function calls the HDF5 library and returns the result appropriately.
<p>There is one native method for each HDF entry point (several hundred
in all), which are compiled with the HDF library into a dynamically loaded
library (<i>libhdf5_java</i>). Note that this library must be built for each
platform.
<p>To call the HDF `<b><i>H5Fopen</i></b>' function, a Java program would
import the package '<i><b>hdf.hdf5lib.*</b>'</i>, and invoke the method
on the class '<b><i>H5</i></b>'. The Java program would look something
like this:
<pre><b>import hdf.hdf5lib.*;
{
&nbsp;/* ... */
&nbsp;try {
&nbsp;file = H5.Hopen("myFile.hdf", flags, access );
&nbsp;} catch (HDF5Exception ex) {
&nbsp;//...
&nbsp;}
&nbsp;/* ... */
}</b></pre>
The <i><b>H5</b> </i>class automatically loads the native method implementations
and the HDF5 library.
<h3>To Obtain</h3>
The JHI5 is included with the <a href="https://support.hdfgroup.org/downloads/index.html">HDF5</a> library.
</body>
+120
View File
@@ -0,0 +1,120 @@
#-----------------------------------------------------------------------------
# CMake configuration for HDF5 Java JNI library
# This file sets up the build, formatting, and installation rules for the HDF5 Java JNI shared library.
# It handles JNI C/C++ source and header definitions, compiler options, linking, export, and integration with the HDF5 shared library for Java bindings.
#-----------------------------------------------------------------------------
cmake_minimum_required (VERSION 3.26)
project (HDF5_JAVA_SRCJNI_JNI C)
set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "${HDF5_JAVA_INCLUDE_DIRECTORIES}")
set (HDF5_JAVA_JNI_CSRCS
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/exceptionImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5aImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5Constants.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5dImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5eImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5fImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5gImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5iImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5Imp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5lImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5oImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5pImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5pACPLImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5pDAPLImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5pDCPLImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5pDXPLImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5pFAPLImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5pFCPLImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5pGAPLImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5pGCPLImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5pLAPLImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5pLCPLImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5pOCPLImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5pOCpyPLImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5pStrCPLImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5plImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5rImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5sImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5tImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5util.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5vlImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5zImp.c
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/nativeData.c
)
set (HDF5_JAVA_JNI_CHDRS
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/exceptionImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5aImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5dImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5eImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5fImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5gImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5iImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5Imp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5jni.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5lImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5oImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5pImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5pACPLImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5pDAPLImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5pDCPLImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5pDXPLImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5pFAPLImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5pFCPLImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5pGAPLImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5pGCPLImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5pLAPLImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5pLCPLImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5pOCPLImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5pOCpyPLImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5pStrCPLImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5plImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5rImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5sImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5tImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5util.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5vlImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/h5zImp.h
${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR}/nativeData.h
)
set (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
########### JNI libraries always must be built shared ###############
add_library (${HDF5_JAVA_JNI_LIB_TARGET} SHARED ${HDF5_JAVA_JNI_CSRCS} ${HDF5_JAVA_JNI_CHDRS})
target_include_directories (${HDF5_JAVA_JNI_LIB_TARGET}
PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};${HDF5_JAVA_SRCJNI_JNI_SOURCE_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
)
target_compile_options(${HDF5_JAVA_JNI_LIB_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
TARGET_C_PROPERTIES (${HDF5_JAVA_JNI_LIB_TARGET} SHARED)
target_link_libraries (${HDF5_JAVA_JNI_LIB_TARGET} PUBLIC ${HDF5_LIBSH_TARGET})
set_target_properties (${HDF5_JAVA_JNI_LIB_TARGET} PROPERTIES FOLDER libraries/jni)
SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_JAVA_JNI_LIB_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_JAVA_JNI_LIB_TARGET} ${HDF5_JAVA_JNI_LIB_NAME} SHARED "JAVA")
#-----------------------------------------------------------------------------
# Add Target to clang-format
#-----------------------------------------------------------------------------
if (HDF5_ENABLE_FORMATTERS)
clang_format (HDF5_JNI_SRC_FORMAT ${HDF5_JAVA_JNI_LIB_TARGET})
endif ()
#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
if (HDF5_EXPORTED_TARGETS)
INSTALL_TARGET_PDB (${HDF5_JAVA_JNI_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} libraries)
install (
TARGETS
${HDF5_JAVA_JNI_LIB_TARGET}
EXPORT
${HDF5_EXPORTED_TARGETS}
LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT libraries
ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT libraries
RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT libraries
FRAMEWORK DESTINATION ${HDF5_INSTALL_FWRK_DIR} COMPONENT libraries
INCLUDES DESTINATION include
)
endif ()
+487
View File
@@ -0,0 +1,487 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/***********/
/* Headers */
/***********/
#include "hdf5.h"
#include <stdio.h>
#include <stdlib.h>
#include "jni.h"
#include "h5jni.h"
#include "exceptionImp.h"
extern H5E_auto2_t efunc;
extern void *edata;
/*******************/
/* Local Variables */
/*******************/
/*
* The list of error messages in the system is kept as an array of
* error_code/message pairs, one for major error numbers and another for
* minor error numbers.
*/
typedef struct H5E_major_mesg_t {
hid_t error_code;
const char *str;
} H5E_major_mesg_t;
typedef struct H5E_minor_mesg_t {
hid_t error_code;
const char *str;
} H5E_minor_mesg_t;
/* major and minor error numbers */
typedef struct H5E_num_t {
hid_t maj_num;
hid_t min_num;
} H5E_num_t;
/********************/
/* Local Macros */
/********************/
#define THROWEXCEPTION(className, args) \
{ \
jmethodID jm; \
jclass jc; \
jobject ex; \
\
if (NULL == (jc = ENVPTR->FindClass(ENVONLY, (className)))) \
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); \
\
if (NULL == (jm = ENVPTR->GetMethodID(ENVONLY, jc, "<init>", "(Ljava/lang/String;)V"))) { \
printf("THROWEXCEPTION FATAL ERROR: GetMethodID failed\n"); \
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); \
} \
\
if (NULL == (ex = ENVPTR->NewObjectA(ENVONLY, jc, jm, (jvalue *)(args)))) { \
printf("THROWEXCEPTION FATAL ERROR: Class %s: Creation failed\n", (className)); \
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); \
} \
\
if (ENVPTR->Throw(ENVONLY, (jthrowable)ex) < 0) { \
printf("THROWEXCEPTION FATAL ERROR: Class %s: Throw failed\n", (className)); \
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); \
} \
}
/********************/
/* Local Prototypes */
/********************/
static const char *defineHDF5LibraryException(hid_t maj_num);
static jboolean H5JNIErrorClass(JNIEnv *env, const char *message, const char *className);
/* get the major and minor error numbers on the top of the error stack */
static herr_t
walk_error_callback(unsigned n, const H5E_error2_t *err_desc, void *_err_nums)
{
H5E_num_t *err_nums = (H5E_num_t *)_err_nums;
UNUSED(n);
if (err_desc) {
err_nums->maj_num = err_desc->maj_num;
err_nums->min_num = err_desc->min_num;
} /* end if */
return 0;
} /* end walk_error_callback() */
/*
* Class: hdf_hdf5lib_exceptions_HDF5Library
* Method: H5error_off
* Signature: ()I
*
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5error_1off(JNIEnv *env, jclass clss)
{
UNUSED(env);
UNUSED(clss);
if (H5Eget_auto2(H5E_DEFAULT, &efunc, &edata) < 0)
return -1;
if (H5Eset_auto2(H5E_DEFAULT, NULL, NULL) < 0)
return -1;
return 0;
} /* end Java_hdf_hdf5lib_H5_H5error_1off() */
/*
* Class: hdf_hdf5lib_exceptions_HDF5Library
* Method: H5error_on
* Signature: ()V
*
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5error_1on(JNIEnv *env, jclass clss)
{
UNUSED(env);
UNUSED(clss);
H5Eset_auto2(H5E_DEFAULT, efunc, edata);
} /* end Java_hdf_hdf5lib_H5_H5error_1on() */
/*
* Class: hdf_hdf5lib_exceptions_HDFLibraryException
* Method: printStackTrace0
* Signature: (Ljava/lang/Object;)V
*
* Call the HDF5 library to print the HDF5 error stack to 'file_name'.
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_exceptions_HDF5LibraryException_printStackTrace0(JNIEnv *env, jobject obj, jstring file_name)
{
FILE *stream = NULL;
const char *file = NULL;
UNUSED(obj);
if (NULL == file_name) {
H5Eprint2(H5E_DEFAULT, stderr);
}
else {
PIN_JAVA_STRING(ENVONLY, file_name, file, NULL, "printStackTrace0: file name not pinned");
if ((stream = fopen(file, "a+"))) {
H5Eprint2(H5E_DEFAULT, stream);
fclose(stream);
}
}
done:
if (file)
UNPIN_JAVA_STRING(ENVONLY, file_name, file);
return;
} /* end Java_hdf_hdf5lib_exceptions_HDF5LibraryException_printStackTrace0() */
/*
* Class: hdf_hdf5lib_exceptions_HDFLibraryException
* Method: _getMajorErrorNumber
* Signature: ()J
*
* Extract the HDF5 major error number from the HDF5 error stack.
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_exceptions_HDF5LibraryException__1getMajorErrorNumber(JNIEnv *env, jobject obj)
{
H5E_num_t err_nums;
UNUSED(env);
UNUSED(obj);
err_nums.maj_num = 0;
err_nums.min_num = 0;
if (H5Ewalk2(H5E_DEFAULT, H5E_WALK_DOWNWARD, walk_error_callback, &err_nums) < 0)
return -1;
return err_nums.maj_num;
} /* end Java_hdf_hdf5lib_exceptions_HDF5LibraryException__1getMajorErrorNumber() */
/*
* Class: hdf_hdf5lib_exceptions_HDFLibraryException
* Method: _getMinorErrorNumber
* Signature: ()J
*
* Extract the HDF5 minor error number from the HDF5 error stack.
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_exceptions_HDF5LibraryException__1getMinorErrorNumber(JNIEnv *env, jobject obj)
{
H5E_num_t err_nums;
UNUSED(env);
UNUSED(obj);
err_nums.maj_num = 0;
err_nums.min_num = 0;
if (H5Ewalk2(H5E_DEFAULT, H5E_WALK_DOWNWARD, walk_error_callback, &err_nums) < 0)
return -1;
return err_nums.min_num;
} /* end Java_hdf_hdf5lib_exceptions_HDF5LibraryException__1getMinorErrorNumber() */
/*
* Routine to raise particular Java exceptions from C.
*/
static jboolean
H5JNIErrorClass(JNIEnv *env, const char *message, const char *className)
{
jstring str;
char *args[2];
jboolean retVal = JNI_FALSE;
if (NULL == (str = ENVPTR->NewStringUTF(ENVONLY, message)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
args[0] = (char *)str;
args[1] = 0;
THROWEXCEPTION(className, args);
retVal = JNI_TRUE;
done:
return retVal;
} /* end H5JNIErrorClass() */
/*
* Create and throw an 'outOfMemoryException'
*
* Note: This routine never returns from the 'throw',
* and the Java native method immediately raises the
* exception.
*/
jboolean
h5outOfMemory(JNIEnv *env, const char *message)
{
return H5JNIErrorClass(env, message, "java/lang/OutOfMemoryError");
} /* end h5outOfMemory() */
/*
* Create and throw an 'AssertionError'
*
* Note: This routine never returns from the 'throw',
* and the Java native method immediately raises the
* exception.
*/
jboolean
h5assertion(JNIEnv *env, const char *message)
{
return H5JNIErrorClass(env, message, "java/lang/AssertionError");
} /* end h5assertion() */
/*
* A fatal error in a JNI call
* Create and throw an 'InternalError'
*
* Note: This routine never returns from the 'throw',
* and the Java native method immediately raises the
* exception.
*/
jboolean
h5JNIFatalError(JNIEnv *env, const char *message)
{
return H5JNIErrorClass(env, message, "java/lang/InternalError");
} /* end h5JNIFatalError() */
/*
* A NULL argument in an HDF5 call
* Create and throw an 'NullPointerException'
*
* Note: This routine never returns from the 'throw',
* and the Java native method immediately raises the
* exception.
*/
jboolean
h5nullArgument(JNIEnv *env, const char *message)
{
return H5JNIErrorClass(env, message, "java/lang/NullPointerException");
} /* end h5nullArgument() */
/*
* A bad argument in an HDF5 call
* Create and throw an 'IllegalArgumentException'
*
* Note: This routine never returns from the 'throw',
* and the Java native method immediately raises the
* exception.
*/
jboolean
h5badArgument(JNIEnv *env, const char *message)
{
return H5JNIErrorClass(env, message, "java/lang/IllegalArgumentException");
} /* end h5badArgument() */
/*
* Some feature Not implemented yet
* Create and throw an 'UnsupportedOperationException'
*
* Note: This routine never returns from the 'throw',
* and the Java native method immediately raises the
* exception.
*/
jboolean
h5unimplemented(JNIEnv *env, const char *message)
{
return H5JNIErrorClass(env, message, "java/lang/UnsupportedOperationException");
} /* end h5unimplemented() */
/* h5raiseException(). This routine is called to generate
* an arbitrary Java exception with a particular message.
*
* Note: This routine never returns from the 'throw',
* and the Java native method immediately raises the
* exception.
*/
jboolean
h5raiseException(JNIEnv *env, const char *message, const char *exception)
{
return H5JNIErrorClass(env, message, exception);
} /* end h5raiseException() */
/*
* h5libraryError() determines the HDF5 major error code
* and creates and throws the appropriate sub-class of
* HDF5LibraryException(). This routine should be called
* whenever a call to the HDF5 library fails, i.e., when
* the return is -1.
*
* Note: This routine never returns from the 'throw',
* and the Java native method immediately raises the
* exception.
*/
jboolean
h5libraryError(JNIEnv *env)
{
const char *exception = NULL;
H5E_type_t error_msg_type;
H5E_num_t exceptionNumbers;
jstring str = NULL;
ssize_t msg_size = 0;
hid_t min_num;
hid_t maj_num;
hid_t stk_id = H5I_INVALID_HID;
char *args[2];
char *msg_str = NULL;
jboolean retVal = JNI_FALSE;
exceptionNumbers.maj_num = 0;
exceptionNumbers.min_num = 0;
/* Save current stack contents for future use */
if ((stk_id = H5Eget_current_stack()) >= 0)
/* This will clear current stack */
if (H5Ewalk2(stk_id, H5E_WALK_DOWNWARD, walk_error_callback, &exceptionNumbers) < 0)
goto done;
maj_num = exceptionNumbers.maj_num;
min_num = exceptionNumbers.min_num;
/*
* TODO: handle < 0 case.
*/
/*
* No error detected in HDF5 error stack.
*/
if (!maj_num && !min_num)
goto done;
exception = defineHDF5LibraryException(maj_num);
/* get the length of the name */
if ((msg_size = H5Eget_msg(min_num, NULL, NULL, 0)) < 0)
goto done;
if (msg_size > 0) {
if (NULL == (msg_str = (char *)calloc((size_t)msg_size + 1, sizeof(char))))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "h5libraryerror: failed to allocate buffer for error message");
if ((msg_size = H5Eget_msg(min_num, &error_msg_type, msg_str, (size_t)msg_size + 1)) < 0)
goto done;
msg_str[msg_size] = '\0';
if (NULL == (str = ENVPTR->NewStringUTF(ENVONLY, msg_str)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
}
else
str = NULL;
if (stk_id >= 0)
H5Eset_current_stack(stk_id);
args[0] = (char *)str;
args[1] = 0;
THROWEXCEPTION(exception, args);
retVal = JNI_TRUE;
done:
if (msg_str)
free(msg_str);
return retVal;
} /* end h5libraryError() */
/*
* defineHDF5LibraryException() returns the name of the sub-class
* which goes with an HDF5 error code.
*/
static const char *
defineHDF5LibraryException(hid_t maj_num)
{
hid_t err_num = maj_num;
if (H5E_ARGS == err_num)
return "hdf/hdf5lib/exceptions/HDF5FunctionArgumentException";
else if (H5E_RESOURCE == err_num)
return "hdf/hdf5lib/exceptions/HDF5ResourceUnavailableException";
else if (H5E_INTERNAL == err_num)
return "hdf/hdf5lib/exceptions/HDF5InternalErrorException";
else if (H5E_FILE == err_num)
return "hdf/hdf5lib/exceptions/HDF5FileInterfaceException";
else if (H5E_IO == err_num)
return "hdf/hdf5lib/exceptions/HDF5LowLevelIOException";
else if (H5E_FUNC == err_num)
return "hdf/hdf5lib/exceptions/HDF5FunctionEntryExitException";
else if (H5E_ID == err_num)
return "hdf/hdf5lib/exceptions/HDF5IdException";
else if (H5E_CACHE == err_num)
return "hdf/hdf5lib/exceptions/HDF5MetaDataCacheException";
else if (H5E_BTREE == err_num)
return "hdf/hdf5lib/exceptions/HDF5BtreeException";
else if (H5E_SYM == err_num)
return "hdf/hdf5lib/exceptions/HDF5SymbolTableException";
else if (H5E_HEAP == err_num)
return "hdf/hdf5lib/exceptions/HDF5HeapException";
else if (H5E_OHDR == err_num)
return "hdf/hdf5lib/exceptions/HDF5ObjectHeaderException";
else if (H5E_DATATYPE == err_num)
return "hdf/hdf5lib/exceptions/HDF5DatatypeInterfaceException";
else if (H5E_DATASPACE == err_num)
return "hdf/hdf5lib/exceptions/HDF5DataspaceInterfaceException";
else if (H5E_DATASET == err_num)
return "hdf/hdf5lib/exceptions/HDF5DatasetInterfaceException";
else if (H5E_STORAGE == err_num)
return "hdf/hdf5lib/exceptions/HDF5DataStorageException";
else if (H5E_PLIST == err_num)
return "hdf/hdf5lib/exceptions/HDF5PropertyListInterfaceException";
else if (H5E_ATTR == err_num)
return "hdf/hdf5lib/exceptions/HDF5AttributeException";
else if (H5E_PLINE == err_num)
return "hdf/hdf5lib/exceptions/HDF5DataFiltersException";
else if (H5E_EFL == err_num)
return "hdf/hdf5lib/exceptions/HDF5ExternalFileListException";
else if (H5E_REFERENCE == err_num)
return "hdf/hdf5lib/exceptions/HDF5ReferenceException";
return "hdf/hdf5lib/exceptions/HDF5LibraryException";
} /* end defineHDF5LibraryException() */
#ifdef __cplusplus
} /* end extern "C" */
#endif /* __cplusplus */
+70
View File
@@ -0,0 +1,70 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <jni.h>
/* Header for class hdf_hdf5lib_H5_exception */
#ifndef Included_hdf_hdf5lib_H5_exception
#define Included_hdf_hdf5lib_H5_exception
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*
* Class: hdf_hdf5lib_exceptions_HDF5Library
* Method: H5error_off
* Signature: ()I
*
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5error_1off(JNIEnv *env, jclass clss);
/*
* Class: hdf_hdf5lib_exceptions_HDF5Library
* Method: H5error_on
* Signature: ()V
*
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5error_1on(JNIEnv *env, jclass clss);
/*
* Class: hdf_hdf5lib_exceptions_HDFLibraryException
* Method: printStackTrace0
* Signature: (Ljava/lang/Object;)V
*
* Call the HDF5 library to print the HDF5 error stack to 'file_name'.
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_exceptions_HDF5LibraryException_printStackTrace0(JNIEnv *env,
jobject obj,
jstring file_name);
/*
* Class: hdf_hdf5lib_exceptions_HDFLibraryException
* Method: _getMajorErrorNumber
* Signature: ()J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_exceptions_HDF5LibraryException__1getMajorErrorNumber(JNIEnv *env,
jobject obj);
/*
* Class: hdf_hdf5lib_exceptions_HDFLibraryException
* Method: _getMinorErrorNumber
* Signature: ()J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_exceptions_HDF5LibraryException__1getMinorErrorNumber(JNIEnv *env,
jobject obj);
#ifdef __cplusplus
} /* end extern "C" */
#endif /* __cplusplus */
#endif /* Included_hdf_hdf5lib_H5_exception */
+3828
View File
@@ -0,0 +1,3828 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include "hdf5.h"
#include <jni.h>
#include <stdlib.h>
#include "h5jni.h"
H5_WARN_MISSING_PROTOTYPE_OFF
H5_WARN_UNUSED_PARAMETER_OFF
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5_1QUARTER_1HADDR_1MAX(JNIEnv *env, jclass cls)
{
return (hsize_t)HADDR_MAX / 4;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5_1SZIP_1ALLOW_1K13_1OPTION_1MASK(JNIEnv *env, jclass cls)
{
return H5_SZIP_ALLOW_K13_OPTION_MASK;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5_1SZIP_1CHIP_1OPTION_1MASK(JNIEnv *env, jclass cls)
{
return H5_SZIP_CHIP_OPTION_MASK;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5_1SZIP_1EC_1OPTION_1MASK(JNIEnv *env, jclass cls)
{
return H5_SZIP_EC_OPTION_MASK;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5_1SZIP_1MAX_1PIXELS_1PER_1BLOCK(JNIEnv *env, jclass cls)
{
return H5_SZIP_MAX_PIXELS_PER_BLOCK;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5_1SZIP_1NN_1OPTION_1MASK(JNIEnv *env, jclass cls)
{
return H5_SZIP_NN_OPTION_MASK;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5_1INDEX_1UNKNOWN(JNIEnv *env, jclass cls)
{
return H5_INDEX_UNKNOWN;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5_1INDEX_1NAME(JNIEnv *env, jclass cls)
{
return H5_INDEX_NAME;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5_1INDEX_1CRT_1ORDER(JNIEnv *env, jclass cls)
{
return H5_INDEX_CRT_ORDER;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5_1INDEX_1N(JNIEnv *env, jclass cls)
{
return H5_INDEX_N;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5_1ITER_1UNKNOWN(JNIEnv *env, jclass cls)
{
return H5_ITER_UNKNOWN;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5_1ITER_1INC(JNIEnv *env, jclass cls)
{
return H5_ITER_INC;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5_1ITER_1DEC(JNIEnv *env, jclass cls)
{
return H5_ITER_DEC;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5_1ITER_1NATIVE(JNIEnv *env, jclass cls)
{
return H5_ITER_NATIVE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5_1ITER_1N(JNIEnv *env, jclass cls)
{
return H5_ITER_N;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5AC_1CURR_1CACHE_1CONFIG_1VERSION(JNIEnv *env, jclass cls)
{
return H5AC__CURR_CACHE_CONFIG_VERSION;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5AC_1MAX_1TRACE_1FILE_1NAME_1LEN(JNIEnv *env, jclass cls)
{
return H5AC__MAX_TRACE_FILE_NAME_LEN;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5AC_1METADATA_1WRITE_1STRATEGY_1PROCESS_1ZERO_1ONLY(JNIEnv *env, jclass cls)
{
return H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5AC_1METADATA_1WRITE_1STRATEGY_1DISTRIBUTED(JNIEnv *env, jclass cls)
{
return H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5C_1incr_1off(JNIEnv *env, jclass cls)
{
return H5C_incr__off;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5C_1incr_1threshold(JNIEnv *env, jclass cls)
{
return H5C_incr__threshold;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5C_1flash_1incr_1off(JNIEnv *env, jclass cls)
{
return H5C_flash_incr__off;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5C_1flash_1incr_1add_1space(JNIEnv *env, jclass cls)
{
return H5C_flash_incr__add_space;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5C_1decr_1off(JNIEnv *env, jclass cls)
{
return H5C_decr__off;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5C_1decr_1threshold(JNIEnv *env, jclass cls)
{
return H5C_decr__threshold;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5C_1decr_1age_1out(JNIEnv *env, jclass cls)
{
return H5C_decr__age_out;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5C_1decr_1age_1out_1with_1threshold(JNIEnv *env, jclass cls)
{
return H5C_decr__age_out_with_threshold;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5D_1CHUNK_1IDX_1BTREE(JNIEnv *env, jclass cls)
{
return H5D_CHUNK_IDX_BTREE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5D_1ALLOC_1TIME_1DEFAULT(JNIEnv *env, jclass cls)
{
return H5D_ALLOC_TIME_DEFAULT;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5D_1ALLOC_1TIME_1EARLY(JNIEnv *env, jclass cls)
{
return H5D_ALLOC_TIME_EARLY;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5D_1ALLOC_1TIME_1ERROR(JNIEnv *env, jclass cls)
{
return H5D_ALLOC_TIME_ERROR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5D_1ALLOC_1TIME_1INCR(JNIEnv *env, jclass cls)
{
return H5D_ALLOC_TIME_INCR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5D_1ALLOC_1TIME_1LATE(JNIEnv *env, jclass cls)
{
return H5D_ALLOC_TIME_LATE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5D_1FILL_1TIME_1ERROR(JNIEnv *env, jclass cls)
{
return H5D_FILL_TIME_ERROR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5D_1FILL_1TIME_1ALLOC(JNIEnv *env, jclass cls)
{
return H5D_FILL_TIME_ALLOC;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5D_1FILL_1TIME_1NEVER(JNIEnv *env, jclass cls)
{
return H5D_FILL_TIME_NEVER;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5D_1FILL_1TIME_1IFSET(JNIEnv *env, jclass cls)
{
return H5D_FILL_TIME_IFSET;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5D_1FILL_1VALUE_1DEFAULT(JNIEnv *env, jclass cls)
{
return H5D_FILL_VALUE_DEFAULT;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5D_1FILL_1VALUE_1ERROR(JNIEnv *env, jclass cls)
{
return H5D_FILL_VALUE_ERROR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5D_1FILL_1VALUE_1UNDEFINED(JNIEnv *env, jclass cls)
{
return H5D_FILL_VALUE_UNDEFINED;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5D_1FILL_1VALUE_1USER_1DEFINED(JNIEnv *env, jclass cls)
{
return H5D_FILL_VALUE_USER_DEFINED;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5D_1LAYOUT_1ERROR(JNIEnv *env, jclass cls)
{
return H5D_LAYOUT_ERROR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5D_1CHUNKED(JNIEnv *env, jclass cls)
{
return H5D_CHUNKED;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5D_1COMPACT(JNIEnv *env, jclass cls)
{
return H5D_COMPACT;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5D_1CONTIGUOUS(JNIEnv *env, jclass cls)
{
return H5D_CONTIGUOUS;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5D_1VIRTUAL(JNIEnv *env, jclass cls)
{
return H5D_VIRTUAL;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5D_1NLAYOUTS(JNIEnv *env, jclass cls)
{
return H5D_NLAYOUTS;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5D_1SPACE_1STATUS_1ALLOCATED(JNIEnv *env, jclass cls)
{
return H5D_SPACE_STATUS_ALLOCATED;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5D_1SPACE_1STATUS_1ERROR(JNIEnv *env, jclass cls)
{
return H5D_SPACE_STATUS_ERROR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5D_1SPACE_1STATUS_1NOT_1ALLOCATED(JNIEnv *env, jclass cls)
{
return H5D_SPACE_STATUS_NOT_ALLOCATED;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5D_1SPACE_1STATUS_1PART_1ALLOCATED(JNIEnv *env, jclass cls)
{
return H5D_SPACE_STATUS_PART_ALLOCATED;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5D_1VDS_1ERROR(JNIEnv *env, jclass cls)
{
return H5D_VDS_ERROR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5D_1VDS_1FIRST_1MISSING(JNIEnv *env, jclass cls)
{
return H5D_VDS_FIRST_MISSING;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5D_1VDS_1LAST_1AVAILABLE(JNIEnv *env, jclass cls)
{
return H5D_VDS_LAST_AVAILABLE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5D_1CHUNK_1DONT_1FILTER_1PARTIAL_1CHUNKS(JNIEnv *env, jclass cls)
{
return H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1ALIGNMENT(JNIEnv *env, jclass cls)
{
return H5E_ALIGNMENT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1ALREADYEXISTS(JNIEnv *env, jclass cls)
{
return H5E_ALREADYEXISTS;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1ALREADYINIT(JNIEnv *env, jclass cls)
{
return H5E_ALREADYINIT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1ARGS(JNIEnv *env, jclass cls)
{
return H5E_ARGS;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1ID(JNIEnv *env, jclass cls)
{
return H5E_ID;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1ATTR(JNIEnv *env, jclass cls)
{
return H5E_ATTR;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1BADID(JNIEnv *env, jclass cls)
{
return H5E_BADID;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1BADFILE(JNIEnv *env, jclass cls)
{
return H5E_BADFILE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1BADGROUP(JNIEnv *env, jclass cls)
{
return H5E_BADGROUP;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1BADITER(JNIEnv *env, jclass cls)
{
return H5E_BADITER;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1BADMESG(JNIEnv *env, jclass cls)
{
return H5E_BADMESG;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1BADRANGE(JNIEnv *env, jclass cls)
{
return H5E_BADRANGE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1BADSELECT(JNIEnv *env, jclass cls)
{
return H5E_BADSELECT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1BADSIZE(JNIEnv *env, jclass cls)
{
return H5E_BADSIZE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1BADTYPE(JNIEnv *env, jclass cls)
{
return H5E_BADTYPE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1BADVALUE(JNIEnv *env, jclass cls)
{
return H5E_BADVALUE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1BTREE(JNIEnv *env, jclass cls)
{
return H5E_BTREE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CACHE(JNIEnv *env, jclass cls)
{
return H5E_CACHE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CALLBACK(JNIEnv *env, jclass cls)
{
return H5E_CALLBACK;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANAPPLY(JNIEnv *env, jclass cls)
{
return H5E_CANAPPLY;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTALLOC(JNIEnv *env, jclass cls)
{
return H5E_CANTALLOC;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTAPPEND(JNIEnv *env, jclass cls)
{
return H5E_CANTAPPEND;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTATTACH(JNIEnv *env, jclass cls)
{
return H5E_CANTATTACH;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTCLEAN(JNIEnv *env, jclass cls)
{
return H5E_CANTCLEAN;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTCLIP(JNIEnv *env, jclass cls)
{
return H5E_CANTCLIP;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTCLOSEFILE(JNIEnv *env, jclass cls)
{
return H5E_CANTCLOSEFILE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTCLOSEOBJ(JNIEnv *env, jclass cls)
{
return H5E_CANTCLOSEOBJ;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTCOMPARE(JNIEnv *env, jclass cls)
{
return H5E_CANTCOMPARE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTCOMPUTE(JNIEnv *env, jclass cls)
{
return H5E_CANTCOMPUTE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTCONVERT(JNIEnv *env, jclass cls)
{
return H5E_CANTCONVERT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTCOPY(JNIEnv *env, jclass cls)
{
return H5E_CANTCOPY;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTCORK(JNIEnv *env, jclass cls)
{
return H5E_CANTCORK;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTCOUNT(JNIEnv *env, jclass cls)
{
return H5E_CANTCOUNT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTCREATE(JNIEnv *env, jclass cls)
{
return H5E_CANTCREATE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTDEC(JNIEnv *env, jclass cls)
{
return H5E_CANTDEC;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTDECODE(JNIEnv *env, jclass cls)
{
return H5E_CANTDECODE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTDELETE(JNIEnv *env, jclass cls)
{
return H5E_CANTDELETE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTDELETEFILE(JNIEnv *env, jclass cls)
{
return H5E_CANTDELETEFILE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTDEPEND(JNIEnv *env, jclass cls)
{
return H5E_CANTDEPEND;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTDIRTY(JNIEnv *env, jclass cls)
{
return H5E_CANTDIRTY;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTFILTER(JNIEnv *env, jclass cls)
{
return H5E_CANTFILTER;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTENCODE(JNIEnv *env, jclass cls)
{
return H5E_CANTENCODE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTEXPUNGE(JNIEnv *env, jclass cls)
{
return H5E_CANTEXPUNGE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTEXTEND(JNIEnv *env, jclass cls)
{
return H5E_CANTEXTEND;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTFLUSH(JNIEnv *env, jclass cls)
{
return H5E_CANTFLUSH;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTFREE(JNIEnv *env, jclass cls)
{
return H5E_CANTFREE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTGATHER(JNIEnv *env, jclass cls)
{
return H5E_CANTGATHER;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTGC(JNIEnv *env, jclass cls)
{
return H5E_CANTGC;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTGET(JNIEnv *env, jclass cls)
{
return H5E_CANTGET;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTGETSIZE(JNIEnv *env, jclass cls)
{
return H5E_CANTGETSIZE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTINC(JNIEnv *env, jclass cls)
{
return H5E_CANTINC;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTINIT(JNIEnv *env, jclass cls)
{
return H5E_CANTINIT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTINS(JNIEnv *env, jclass cls)
{
return H5E_CANTINS;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTINSERT(JNIEnv *env, jclass cls)
{
return H5E_CANTINSERT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTLIST(JNIEnv *env, jclass cls)
{
return H5E_CANTLIST;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTLOAD(JNIEnv *env, jclass cls)
{
return H5E_CANTLOAD;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTLOCK(JNIEnv *env, jclass cls)
{
return H5E_CANTLOCK;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTLOCKFILE(JNIEnv *env, jclass cls)
{
return H5E_CANTLOCKFILE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTMARKCLEAN(JNIEnv *env, jclass cls)
{
return H5E_CANTMARKCLEAN;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTMARKDIRTY(JNIEnv *env, jclass cls)
{
return H5E_CANTMARKDIRTY;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTMARKSERIALIZED(JNIEnv *env, jclass cls)
{
return H5E_CANTMARKSERIALIZED;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTMARKUNSERIALIZED(JNIEnv *env, jclass cls)
{
return H5E_CANTMARKUNSERIALIZED;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTMERGE(JNIEnv *env, jclass cls)
{
return H5E_CANTMERGE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTMODIFY(JNIEnv *env, jclass cls)
{
return H5E_CANTMODIFY;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTMOVE(JNIEnv *env, jclass cls)
{
return H5E_CANTMOVE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTNEXT(JNIEnv *env, jclass cls)
{
return H5E_CANTNEXT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTNOTIFY(JNIEnv *env, jclass cls)
{
return H5E_CANTNOTIFY;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTOPENFILE(JNIEnv *env, jclass cls)
{
return H5E_CANTOPENFILE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTOPENOBJ(JNIEnv *env, jclass cls)
{
return H5E_CANTOPENOBJ;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTOPERATE(JNIEnv *env, jclass cls)
{
return H5E_CANTOPERATE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTPACK(JNIEnv *env, jclass cls)
{
return H5E_CANTPACK;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTPIN(JNIEnv *env, jclass cls)
{
return H5E_CANTPIN;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTPROTECT(JNIEnv *env, jclass cls)
{
return H5E_CANTPROTECT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTRECV(JNIEnv *env, jclass cls)
{
return H5E_CANTRECV;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTREDISTRIBUTE(JNIEnv *env, jclass cls)
{
return H5E_CANTREDISTRIBUTE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTREGISTER(JNIEnv *env, jclass cls)
{
return H5E_CANTREGISTER;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTRELEASE(JNIEnv *env, jclass cls)
{
return H5E_CANTRELEASE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTREMOVE(JNIEnv *env, jclass cls)
{
return H5E_CANTREMOVE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTRENAME(JNIEnv *env, jclass cls)
{
return H5E_CANTRENAME;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTRESET(JNIEnv *env, jclass cls)
{
return H5E_CANTRESET;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTRESIZE(JNIEnv *env, jclass cls)
{
return H5E_CANTRESIZE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTRESTORE(JNIEnv *env, jclass cls)
{
return H5E_CANTRESTORE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTREVIVE(JNIEnv *env, jclass cls)
{
return H5E_CANTREVIVE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTSHRINK(JNIEnv *env, jclass cls)
{
return H5E_CANTSHRINK;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTSELECT(JNIEnv *env, jclass cls)
{
return H5E_CANTSELECT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTSET(JNIEnv *env, jclass cls)
{
return H5E_CANTSET;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTSERIALIZE(JNIEnv *env, jclass cls)
{
return H5E_CANTSERIALIZE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTSORT(JNIEnv *env, jclass cls)
{
return H5E_CANTSORT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTSPLIT(JNIEnv *env, jclass cls)
{
return H5E_CANTSPLIT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTSWAP(JNIEnv *env, jclass cls)
{
return H5E_CANTSWAP;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTTAG(JNIEnv *env, jclass cls)
{
return H5E_CANTTAG;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTUNCORK(JNIEnv *env, jclass cls)
{
return H5E_CANTUNCORK;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTUNDEPEND(JNIEnv *env, jclass cls)
{
return H5E_CANTUNDEPEND;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTUNLOCK(JNIEnv *env, jclass cls)
{
return H5E_CANTUNLOCK;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTUNLOCKFILE(JNIEnv *env, jclass cls)
{
return H5E_CANTUNLOCKFILE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTUNPIN(JNIEnv *env, jclass cls)
{
return H5E_CANTUNPIN;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTUNPROTECT(JNIEnv *env, jclass cls)
{
return H5E_CANTUNPROTECT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTUNSERIALIZE(JNIEnv *env, jclass cls)
{
return H5E_CANTUNSERIALIZE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTUPDATE(JNIEnv *env, jclass cls)
{
return H5E_CANTUPDATE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CLOSEERROR(JNIEnv *env, jclass cls)
{
return H5E_CLOSEERROR;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1COMPLEN(JNIEnv *env, jclass cls)
{
return H5E_COMPLEN;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1CONTEXT(JNIEnv *env, jclass cls)
{
return H5E_CONTEXT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1DATASET(JNIEnv *env, jclass cls)
{
return H5E_DATASET;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1DATASPACE(JNIEnv *env, jclass cls)
{
return H5E_DATASPACE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1DATATYPE(JNIEnv *env, jclass cls)
{
return H5E_DATATYPE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1DEFAULT(JNIEnv *env, jclass cls)
{
return H5E_DEFAULT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1DUPCLASS(JNIEnv *env, jclass cls)
{
return H5E_DUPCLASS;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1EARRAY(JNIEnv *env, jclass cls)
{
return H5E_EARRAY;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1EFL(JNIEnv *env, jclass cls)
{
return H5E_EFL;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1ERROR(JNIEnv *env, jclass cls)
{
return H5E_ERROR;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1EXISTS(JNIEnv *env, jclass cls)
{
return H5E_EXISTS;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1FARRAY(JNIEnv *env, jclass cls)
{
return H5E_FARRAY;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1FCNTL(JNIEnv *env, jclass cls)
{
return H5E_FCNTL;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1FILE(JNIEnv *env, jclass cls)
{
return H5E_FILE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1FILEEXISTS(JNIEnv *env, jclass cls)
{
return H5E_FILEEXISTS;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1FILEOPEN(JNIEnv *env, jclass cls)
{
return H5E_FILEOPEN;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1FSPACE(JNIEnv *env, jclass cls)
{
return H5E_FSPACE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1FUNC(JNIEnv *env, jclass cls)
{
return H5E_FUNC;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1HEAP(JNIEnv *env, jclass cls)
{
return H5E_HEAP;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1INCONSISTENTSTATE(JNIEnv *env, jclass cls)
{
return H5E_INCONSISTENTSTATE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1INTERNAL(JNIEnv *env, jclass cls)
{
return H5E_INTERNAL;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1IO(JNIEnv *env, jclass cls)
{
return H5E_IO;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1LINK(JNIEnv *env, jclass cls)
{
return H5E_LINK;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1LINKCOUNT(JNIEnv *env, jclass cls)
{
return H5E_LINKCOUNT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1LOGGING(JNIEnv *env, jclass cls)
{
return H5E_LOGGING;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1MAJOR(JNIEnv *env, jclass cls)
{
return H5E_MAJOR;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1MAP(JNIEnv *env, jclass cls)
{
return H5E_MAP;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1MINOR(JNIEnv *env, jclass cls)
{
return H5E_MINOR;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1MOUNT(JNIEnv *env, jclass cls)
{
return H5E_MOUNT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1MPI(JNIEnv *env, jclass cls)
{
return H5E_MPI;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1MPIERRSTR(JNIEnv *env, jclass cls)
{
return H5E_MPIERRSTR;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1NLINKS(JNIEnv *env, jclass cls)
{
return H5E_NLINKS;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1NO_1INDEPENDENT(JNIEnv *env, jclass cls)
{
return H5E_NO_INDEPENDENT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1NOENCODER(JNIEnv *env, jclass cls)
{
return H5E_NOENCODER;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1NOFILTER(JNIEnv *env, jclass cls)
{
return H5E_NOFILTER;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1NOIDS(JNIEnv *env, jclass cls)
{
return H5E_NOIDS;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1NONE_1MAJOR(JNIEnv *env, jclass cls)
{
return H5E_NONE_MAJOR;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1NONE_1MINOR(JNIEnv *env, jclass cls)
{
return H5E_NONE_MINOR;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1NOSPACE(JNIEnv *env, jclass cls)
{
return H5E_NOSPACE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1NOTCACHED(JNIEnv *env, jclass cls)
{
return H5E_NOTCACHED;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1NOTFOUND(JNIEnv *env, jclass cls)
{
return H5E_NOTFOUND;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1NOTHDF5(JNIEnv *env, jclass cls)
{
return H5E_NOTHDF5;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1NOTREGISTERED(JNIEnv *env, jclass cls)
{
return H5E_NOTREGISTERED;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1OBJOPEN(JNIEnv *env, jclass cls)
{
return H5E_OBJOPEN;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1OHDR(JNIEnv *env, jclass cls)
{
return H5E_OHDR;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1OPENERROR(JNIEnv *env, jclass cls)
{
return H5E_OPENERROR;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1OVERFLOW(JNIEnv *env, jclass cls)
{
return H5E_OVERFLOW;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1PAGEBUF(JNIEnv *env, jclass cls)
{
return H5E_PAGEBUF;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1PATH(JNIEnv *env, jclass cls)
{
return H5E_PATH;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1PLINE(JNIEnv *env, jclass cls)
{
return H5E_PLINE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1PLIST(JNIEnv *env, jclass cls)
{
return H5E_PLIST;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1PLUGIN(JNIEnv *env, jclass cls)
{
return H5E_PLUGIN;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1PROTECT(JNIEnv *env, jclass cls)
{
return H5E_PROTECT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1READERROR(JNIEnv *env, jclass cls)
{
return H5E_READERROR;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1REFERENCE(JNIEnv *env, jclass cls)
{
return H5E_REFERENCE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1RESOURCE(JNIEnv *env, jclass cls)
{
return H5E_RESOURCE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1RS(JNIEnv *env, jclass cls)
{
return H5E_RS;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1SEEKERROR(JNIEnv *env, jclass cls)
{
return H5E_SEEKERROR;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1SETDISALLOWED(JNIEnv *env, jclass cls)
{
return H5E_SETDISALLOWED;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1SETLOCAL(JNIEnv *env, jclass cls)
{
return H5E_SETLOCAL;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1SLIST(JNIEnv *env, jclass cls)
{
return H5E_SLIST;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1SOHM(JNIEnv *env, jclass cls)
{
return H5E_SOHM;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1STORAGE(JNIEnv *env, jclass cls)
{
return H5E_STORAGE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1SYM(JNIEnv *env, jclass cls)
{
return H5E_SYM;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1SYSERRSTR(JNIEnv *env, jclass cls)
{
return H5E_SYSERRSTR;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1SYSTEM(JNIEnv *env, jclass cls)
{
return H5E_SYSTEM;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1TRAVERSE(JNIEnv *env, jclass cls)
{
return H5E_TRAVERSE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1TRUNCATED(JNIEnv *env, jclass cls)
{
return H5E_TRUNCATED;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1TST(JNIEnv *env, jclass cls)
{
return H5E_TST;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1UNINITIALIZED(JNIEnv *env, jclass cls)
{
return H5E_UNINITIALIZED;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1UNSUPPORTED(JNIEnv *env, jclass cls)
{
return H5E_UNSUPPORTED;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1VERSION(JNIEnv *env, jclass cls)
{
return H5E_VERSION;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1VFL(JNIEnv *env, jclass cls)
{
return H5E_VFL;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1VOL(JNIEnv *env, jclass cls)
{
return H5E_VOL;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1WALK_1DOWNWARD(JNIEnv *env, jclass cls)
{
return H5E_WALK_DOWNWARD;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1WALK_1UPWARD(JNIEnv *env, jclass cls)
{
return H5E_WALK_UPWARD;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1WRITEERROR(JNIEnv *env, jclass cls)
{
return H5E_WRITEERROR;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5ES_1STATUS_1IN_1PROGRESS(JNIEnv *env, jclass cls)
{
return H5ES_STATUS_IN_PROGRESS;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5ES_1STATUS_1SUCCEED(JNIEnv *env, jclass cls)
{
return H5ES_STATUS_SUCCEED;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5ES_1STATUS_1FAIL(JNIEnv *env, jclass cls)
{
return H5ES_STATUS_FAIL;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5ES_1STATUS_1CANCELED(JNIEnv *env, jclass cls)
{
return H5ES_STATUS_CANCELED;
}
/* Java does not have unsigned native types */
H5_WARN_SIGN_CONVERSION_OFF
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1ACC_1CREAT(JNIEnv *env, jclass cls)
{
return H5F_ACC_CREAT;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1ACC_1EXCL(JNIEnv *env, jclass cls)
{
return H5F_ACC_EXCL;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1ACC_1RDONLY(JNIEnv *env, jclass cls)
{
return H5F_ACC_RDONLY;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1ACC_1RDWR(JNIEnv *env, jclass cls)
{
return H5F_ACC_RDWR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1ACC_1TRUNC(JNIEnv *env, jclass cls)
{
return H5F_ACC_TRUNC;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1ACC_1DEFAULT(JNIEnv *env, jclass cls)
{
return H5F_ACC_DEFAULT;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1ACC_1SWMR_1READ(JNIEnv *env, jclass cls)
{
return H5F_ACC_SWMR_READ;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1ACC_1SWMR_1WRITE(JNIEnv *env, jclass cls)
{
return H5F_ACC_SWMR_WRITE;
}
H5_WARN_SIGN_CONVERSION_ON
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1CLOSE_1DEFAULT(JNIEnv *env, jclass cls)
{
return H5F_CLOSE_DEFAULT;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1CLOSE_1SEMI(JNIEnv *env, jclass cls)
{
return H5F_CLOSE_SEMI;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1CLOSE_1STRONG(JNIEnv *env, jclass cls)
{
return H5F_CLOSE_STRONG;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1CLOSE_1WEAK(JNIEnv *env, jclass cls)
{
return H5F_CLOSE_WEAK;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1LIBVER_1ERROR(JNIEnv *env, jclass cls)
{
return H5F_LIBVER_ERROR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1LIBVER_1EARLIEST(JNIEnv *env, jclass cls)
{
return H5F_LIBVER_EARLIEST;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1LIBVER_1V18(JNIEnv *env, jclass cls)
{
return H5F_LIBVER_V18;
}
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_1V114(JNIEnv *env, jclass cls)
{
return H5F_LIBVER_V114;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1LIBVER_1V200(JNIEnv *env, jclass cls)
{
return H5F_LIBVER_V200;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1LIBVER_1LATEST(JNIEnv *env, jclass cls)
{
return H5F_LIBVER_LATEST;
}
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_1OBJ_1ALL(JNIEnv *env, jclass cls)
{
return H5F_OBJ_ALL;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1OBJ_1ATTR(JNIEnv *env, jclass cls)
{
return H5F_OBJ_ATTR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1OBJ_1DATASET(JNIEnv *env, jclass cls)
{
return H5F_OBJ_DATASET;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1OBJ_1DATATYPE(JNIEnv *env, jclass cls)
{
return H5F_OBJ_DATATYPE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1OBJ_1FILE(JNIEnv *env, jclass cls)
{
return H5F_OBJ_FILE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1OBJ_1GROUP(JNIEnv *env, jclass cls)
{
return H5F_OBJ_GROUP;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1OBJ_1LOCAL(JNIEnv *env, jclass cls)
{
return H5F_OBJ_LOCAL;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1SCOPE_1GLOBAL(JNIEnv *env, jclass cls)
{
return H5F_SCOPE_GLOBAL;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1SCOPE_1LOCAL(JNIEnv *env, jclass cls)
{
return H5F_SCOPE_LOCAL;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1UNLIMITED(JNIEnv *env, jclass cls)
{
return (jint)H5F_UNLIMITED;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1FSPACE_1STRATEGY_1FSM_1AGGR(JNIEnv *env, jclass cls)
{
return H5F_FSPACE_STRATEGY_FSM_AGGR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1FSPACE_1STRATEGY_1AGGR(JNIEnv *env, jclass cls)
{
return H5F_FSPACE_STRATEGY_AGGR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1FSPACE_1STRATEGY_1PAGE(JNIEnv *env, jclass cls)
{
return H5F_FSPACE_STRATEGY_PAGE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1FSPACE_1STRATEGY_1NONE(JNIEnv *env, jclass cls)
{
return H5F_FSPACE_STRATEGY_NONE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1FSPACE_1STRATEGY_1NTYPES(JNIEnv *env, jclass cls)
{
return H5F_FSPACE_STRATEGY_NTYPES;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1CORE(JNIEnv *env, jclass cls)
{
return H5FD_CORE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1DIRECT(JNIEnv *env, jclass cls)
{
#ifdef H5_HAVE_DIRECT
return H5FD_DIRECT;
#else
return H5I_INVALID_HID;
#endif
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1FAMILY(JNIEnv *env, jclass cls)
{
return H5FD_FAMILY;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1HDFS(JNIEnv *env, jclass cls)
{
#ifdef H5_HAVE_LIBHDFS
return H5FD_HDFS;
#else
return H5I_INVALID_HID;
#endif
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1LOG(JNIEnv *env, jclass cls)
{
return H5FD_LOG;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1MPIO(JNIEnv *env, jclass cls)
{
return H5FD_MPIO;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1MULTI(JNIEnv *env, jclass cls)
{
return H5FD_MULTI;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1SEC2(JNIEnv *env, jclass cls)
{
return H5FD_SEC2;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1ROS3(JNIEnv *env, jclass cls)
{
#ifdef H5_HAVE_ROS3_VFD
return H5FD_ROS3;
#else
return H5I_INVALID_HID;
#endif
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1STDIO(JNIEnv *env, jclass cls)
{
return H5FD_STDIO;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1WINDOWS(JNIEnv *env, jclass cls)
{
#ifdef H5_HAVE_WINDOWS
return H5FD_DIRECT;
#else
return H5I_INVALID_HID;
#endif
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1LOG_1LOC_1READ(JNIEnv *env, jclass cls)
{
return H5FD_LOG_LOC_READ;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1LOG_1LOC_1WRITE(JNIEnv *env, jclass cls)
{
return H5FD_LOG_LOC_WRITE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1LOG_1LOC_1SEEK(JNIEnv *env, jclass cls)
{
return H5FD_LOG_LOC_SEEK;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1LOG_1LOC_1IO(JNIEnv *env, jclass cls)
{
return H5FD_LOG_LOC_IO;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1LOG_1FILE_1READ(JNIEnv *env, jclass cls)
{
return H5FD_LOG_FILE_READ;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1LOG_1FILE_1WRITE(JNIEnv *env, jclass cls)
{
return H5FD_LOG_FILE_WRITE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1LOG_1FILE_1IO(JNIEnv *env, jclass cls)
{
return H5FD_LOG_FILE_IO;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1LOG_1FLAVOR(JNIEnv *env, jclass cls)
{
return H5FD_LOG_FLAVOR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1LOG_1NUM_1READ(JNIEnv *env, jclass cls)
{
return H5FD_LOG_NUM_READ;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1LOG_1NUM_1WRITE(JNIEnv *env, jclass cls)
{
return H5FD_LOG_NUM_WRITE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1LOG_1NUM_1SEEK(JNIEnv *env, jclass cls)
{
return H5FD_LOG_NUM_SEEK;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1LOG_1NUM_1TRUNCATE(JNIEnv *env, jclass cls)
{
return H5FD_LOG_NUM_TRUNCATE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1LOG_1NUM_1IO(JNIEnv *env, jclass cls)
{
return H5FD_LOG_NUM_IO;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1LOG_1TIME_1OPEN(JNIEnv *env, jclass cls)
{
return H5FD_LOG_TIME_OPEN;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1LOG_1TIME_1STAT(JNIEnv *env, jclass cls)
{
return H5FD_LOG_TIME_STAT;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1LOG_1TIME_1READ(JNIEnv *env, jclass cls)
{
return H5FD_LOG_TIME_READ;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1LOG_1TIME_1WRITE(JNIEnv *env, jclass cls)
{
return H5FD_LOG_TIME_WRITE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1LOG_1TIME_1SEEK(JNIEnv *env, jclass cls)
{
return H5FD_LOG_TIME_SEEK;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1LOG_1TIME_1CLOSE(JNIEnv *env, jclass cls)
{
return H5FD_LOG_TIME_CLOSE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1LOG_1TIME_1IO(JNIEnv *env, jclass cls)
{
return H5FD_LOG_TIME_IO;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1LOG_1ALLOC(JNIEnv *env, jclass cls)
{
return H5FD_LOG_ALLOC;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1LOG_1ALL(JNIEnv *env, jclass cls)
{
return H5FD_LOG_ALL;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1MEM_1NOLIST(JNIEnv *env, jclass cls)
{
return H5FD_MEM_NOLIST;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1MEM_1DEFAULT(JNIEnv *env, jclass cls)
{
return H5FD_MEM_DEFAULT;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1MEM_1SUPER(JNIEnv *env, jclass cls)
{
return H5FD_MEM_SUPER;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1MEM_1BTREE(JNIEnv *env, jclass cls)
{
return H5FD_MEM_BTREE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1MEM_1DRAW(JNIEnv *env, jclass cls)
{
return H5FD_MEM_DRAW;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1MEM_1GHEAP(JNIEnv *env, jclass cls)
{
return H5FD_MEM_GHEAP;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1MEM_1LHEAP(JNIEnv *env, jclass cls)
{
return H5FD_MEM_LHEAP;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1MEM_1OHDR(JNIEnv *env, jclass cls)
{
return H5FD_MEM_OHDR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1MEM_1NTYPES(JNIEnv *env, jclass cls)
{
return H5FD_MEM_NTYPES;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1DEFAULT_1HADDR_1SIZE(JNIEnv *env, jclass cls)
{
return (hsize_t)(HADDR_MAX / H5FD_MEM_NTYPES);
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1MEM_1DEFAULT_1SIZE(JNIEnv *env, jclass cls)
{
return (hsize_t)0;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1MEM_1DEFAULT_1SUPER_1SIZE(JNIEnv *env, jclass cls)
{
return (hsize_t)0;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1MEM_1DEFAULT_1BTREE_1SIZE(JNIEnv *env, jclass cls)
{
return (hsize_t)(1 * (HADDR_MAX / (H5FD_MEM_NTYPES - 1)));
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1MEM_1DEFAULT_1DRAW_1SIZE(JNIEnv *env, jclass cls)
{
return (hsize_t)(2 * (HADDR_MAX / (H5FD_MEM_NTYPES - 1)));
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1MEM_1DEFAULT_1GHEAP_1SIZE(JNIEnv *env, jclass cls)
{
return (hsize_t)(3 * (HADDR_MAX / (H5FD_MEM_NTYPES - 1)));
}
H5_WARN_SIGN_CONVERSION_OFF
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1MEM_1DEFAULT_1LHEAP_1SIZE(JNIEnv *env, jclass cls)
{
/* XXX: BADNESS! - This value cannot fit into a jlong!
*
* For now, we're going to ignore these values since the multi VFD is
* scheduled for removal in HDF5 2.0.
*/
return (hsize_t)(4 * (HADDR_MAX / (H5FD_MEM_NTYPES - 1)));
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1MEM_1DEFAULT_1OHDR_1SIZE(JNIEnv *env, jclass cls)
{
/* XXX: BADNESS! - This value cannot fit into a jlong! */
return (hsize_t)(5 * (HADDR_MAX / (H5FD_MEM_NTYPES - 1)));
}
H5_WARN_SIGN_CONVERSION_ON
/* Symbols defined for compatibility with previous versions of the HDF5 API.
*
* Use of these symbols is deprecated.
*/
#ifndef H5_NO_DEPRECATED_SYMBOLS
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5G_1DATASET(JNIEnv *env, jclass cls)
{
return H5G_DATASET;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5G_1GROUP(JNIEnv *env, jclass cls)
{
return H5G_GROUP;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5G_1LINK(JNIEnv *env, jclass cls)
{
return H5G_LINK;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5G_1UDLINK(JNIEnv *env, jclass cls)
{
return H5G_UDLINK;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5G_1RESERVED_15(JNIEnv *env, jclass cls)
{
return H5G_RESERVED_5;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5G_1RESERVED_16(JNIEnv *env, jclass cls)
{
return H5G_RESERVED_6;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5G_1RESERVED_17(JNIEnv *env, jclass cls)
{
return H5G_RESERVED_7;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5G_1TYPE(JNIEnv *env, jclass cls)
{
return H5G_TYPE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5G_1UNKNOWN(JNIEnv *env, jclass cls)
{
return H5G_UNKNOWN;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5G_1LINK_1ERROR(JNIEnv *env, jclass cls)
{
return H5G_LINK_ERROR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5G_1LINK_1HARD(JNIEnv *env, jclass cls)
{
return H5G_LINK_HARD;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5G_1LINK_1SOFT(JNIEnv *env, jclass cls)
{
return H5G_LINK_SOFT;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5G_1NLIBTYPES(JNIEnv *env, jclass cls)
{
return H5G_NLIBTYPES;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5G_1NTYPES(JNIEnv *env, jclass cls)
{
return H5G_NTYPES;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5G_1NUSERTYPES(JNIEnv *env, jclass cls)
{
return H5G_NUSERTYPES;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5G_1SAME_1LOC(JNIEnv *env, jclass cls)
{
return H5G_SAME_LOC;
}
#endif /* H5_NO_DEPRECATED_SYMBOLS */
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5G_1STORAGE_1TYPE_1UNKNOWN(JNIEnv *env, jclass cls)
{
return H5G_STORAGE_TYPE_UNKNOWN;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5G_1STORAGE_1TYPE_1SYMBOL_1TABLE(JNIEnv *env, jclass cls)
{
return H5G_STORAGE_TYPE_SYMBOL_TABLE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5G_1STORAGE_1TYPE_1COMPACT(JNIEnv *env, jclass cls)
{
return H5G_STORAGE_TYPE_COMPACT;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5G_1STORAGE_1TYPE_1DENSE(JNIEnv *env, jclass cls)
{
return H5G_STORAGE_TYPE_DENSE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5I_1UNINIT(JNIEnv *env, jclass cls)
{
return H5I_UNINIT;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5I_1BADID(JNIEnv *env, jclass cls)
{
return H5I_BADID;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5I_1FILE(JNIEnv *env, jclass cls)
{
return H5I_FILE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5I_1GROUP(JNIEnv *env, jclass cls)
{
return H5I_GROUP;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5I_1DATATYPE(JNIEnv *env, jclass cls)
{
return H5I_DATATYPE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5I_1DATASPACE(JNIEnv *env, jclass cls)
{
return H5I_DATASPACE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5I_1DATASET(JNIEnv *env, jclass cls)
{
return H5I_DATASET;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5I_1ATTR(JNIEnv *env, jclass cls)
{
return H5I_ATTR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5I_1VFL(JNIEnv *env, jclass cls)
{
return H5I_VFL;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5I_1VOL(JNIEnv *env, jclass cls)
{
return H5I_VOL;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5I_1INVALID_1HID(JNIEnv *env, jclass cls)
{
return H5I_INVALID_HID;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5I_1GENPROP_1CLS(JNIEnv *env, jclass cls)
{
return H5I_GENPROP_CLS;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5I_1GENPROP_1LST(JNIEnv *env, jclass cls)
{
return H5I_GENPROP_LST;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5I_1ERROR_1CLASS(JNIEnv *env, jclass cls)
{
return H5I_ERROR_CLASS;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5I_1ERROR_1MSG(JNIEnv *env, jclass cls)
{
return H5I_ERROR_MSG;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5I_1ERROR_1STACK(JNIEnv *env, jclass cls)
{
return H5I_ERROR_STACK;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5I_1NTYPES(JNIEnv *env, jclass cls)
{
return H5I_NTYPES;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5L_1TYPE_1ERROR(JNIEnv *env, jclass cls)
{
return H5L_TYPE_ERROR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5L_1TYPE_1HARD(JNIEnv *env, jclass cls)
{
return H5L_TYPE_HARD;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5L_1TYPE_1SOFT(JNIEnv *env, jclass cls)
{
return H5L_TYPE_SOFT;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5L_1TYPE_1EXTERNAL(JNIEnv *env, jclass cls)
{
return H5L_TYPE_EXTERNAL;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5L_1TYPE_1MAX(JNIEnv *env, jclass cls)
{
return H5L_TYPE_MAX;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5O_1COPY_1SHALLOW_1HIERARCHY_1FLAG(JNIEnv *env, jclass cls)
{
return H5O_COPY_SHALLOW_HIERARCHY_FLAG;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5O_1COPY_1EXPAND_1SOFT_1LINK_1FLAG(JNIEnv *env, jclass cls)
{
return H5O_COPY_EXPAND_SOFT_LINK_FLAG;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5O_1COPY_1EXPAND_1EXT_1LINK_1FLAG(JNIEnv *env, jclass cls)
{
return H5O_COPY_EXPAND_EXT_LINK_FLAG;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5O_1COPY_1EXPAND_1REFERENCE_1FLAG(JNIEnv *env, jclass cls)
{
return H5O_COPY_EXPAND_REFERENCE_FLAG;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5O_1COPY_1WITHOUT_1ATTR_1FLAG(JNIEnv *env, jclass cls)
{
return H5O_COPY_WITHOUT_ATTR_FLAG;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5O_1COPY_1PRESERVE_1NULL_1FLAG(JNIEnv *env, jclass cls)
{
return H5O_COPY_PRESERVE_NULL_FLAG;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5O_1INFO_1BASIC(JNIEnv *env, jclass cls)
{
return H5O_INFO_BASIC;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5O_1INFO_1TIME(JNIEnv *env, jclass cls)
{
return H5O_INFO_TIME;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5O_1INFO_1NUM_1ATTRS(JNIEnv *env, jclass cls)
{
return H5O_INFO_NUM_ATTRS;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5O_1INFO_1ALL(JNIEnv *env, jclass cls)
{
return H5O_INFO_ALL;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5O_1NATIVE_1INFO_1HDR(JNIEnv *env, jclass cls)
{
return H5O_NATIVE_INFO_HDR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5O_1NATIVE_1INFO_1META_1SIZE(JNIEnv *env, jclass cls)
{
return H5O_NATIVE_INFO_META_SIZE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5O_1NATIVE_1INFO_1ALL(JNIEnv *env, jclass cls)
{
return H5O_NATIVE_INFO_ALL;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5O_1SHMESG_1NONE_1FLAG(JNIEnv *env, jclass cls)
{
return H5O_SHMESG_NONE_FLAG;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5O_1SHMESG_1SDSPACE_1FLAG(JNIEnv *env, jclass cls)
{
return H5O_SHMESG_SDSPACE_FLAG;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5O_1SHMESG_1DTYPE_1FLAG(JNIEnv *env, jclass cls)
{
return H5O_SHMESG_DTYPE_FLAG;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5O_1SHMESG_1FILL_1FLAG(JNIEnv *env, jclass cls)
{
return H5O_SHMESG_FILL_FLAG;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5O_1SHMESG_1PLINE_1FLAG(JNIEnv *env, jclass cls)
{
return H5O_SHMESG_PLINE_FLAG;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5O_1SHMESG_1ATTR_1FLAG(JNIEnv *env, jclass cls)
{
return H5O_SHMESG_ATTR_FLAG;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5O_1SHMESG_1ALL_1FLAG(JNIEnv *env, jclass cls)
{
return H5O_SHMESG_ALL_FLAG;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5O_1TYPE_1UNKNOWN(JNIEnv *env, jclass cls)
{
return H5O_TYPE_UNKNOWN;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5O_1TYPE_1GROUP(JNIEnv *env, jclass cls)
{
return H5O_TYPE_GROUP;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5O_1TYPE_1DATASET(JNIEnv *env, jclass cls)
{
return H5O_TYPE_DATASET;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5O_1TYPE_1NAMED_1DATATYPE(JNIEnv *env, jclass cls)
{
return H5O_TYPE_NAMED_DATATYPE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5O_1TYPE_1NTYPES(JNIEnv *env, jclass cls)
{
return H5O_TYPE_NTYPES;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5O_1MAX_1TOKEN_1SIZE(JNIEnv *env, jclass cls)
{
return H5O_MAX_TOKEN_SIZE;
}
JNIEXPORT jobject JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5O_1TOKEN_1UNDEF(JNIEnv *env, jclass cls)
{
H5O_token_t undef_token = H5O_TOKEN_UNDEF;
/* TODO: Can be optimized by keeping a global reference to the undefined token class */
return create_H5O_token_t(env, &undef_token, false);
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1ROOT(JNIEnv *env, jclass cls)
{
return H5P_ROOT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1OBJECT_1CREATE(JNIEnv *env, jclass cls)
{
return H5P_OBJECT_CREATE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1FILE_1CREATE(JNIEnv *env, jclass cls)
{
return H5P_FILE_CREATE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1FILE_1ACCESS(JNIEnv *env, jclass cls)
{
return H5P_FILE_ACCESS;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1DATASET_1CREATE(JNIEnv *env, jclass cls)
{
return H5P_DATASET_CREATE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1DATASET_1ACCESS(JNIEnv *env, jclass cls)
{
return H5P_DATASET_ACCESS;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1DATASET_1XFER(JNIEnv *env, jclass cls)
{
return H5P_DATASET_XFER;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1FILE_1MOUNT(JNIEnv *env, jclass cls)
{
return H5P_FILE_MOUNT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1GROUP_1CREATE(JNIEnv *env, jclass cls)
{
return H5P_GROUP_CREATE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1GROUP_1ACCESS(JNIEnv *env, jclass cls)
{
return H5P_GROUP_ACCESS;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1DATATYPE_1CREATE(JNIEnv *env, jclass cls)
{
return H5P_DATATYPE_CREATE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1DATATYPE_1ACCESS(JNIEnv *env, jclass cls)
{
return H5P_DATATYPE_ACCESS;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1STRING_1CREATE(JNIEnv *env, jclass cls)
{
return H5P_STRING_CREATE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1ATTRIBUTE_1CREATE(JNIEnv *env, jclass cls)
{
return H5P_ATTRIBUTE_CREATE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1ATTRIBUTE_1ACCESS(JNIEnv *env, jclass cls)
{
return H5P_ATTRIBUTE_ACCESS;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1OBJECT_1COPY(JNIEnv *env, jclass cls)
{
return H5P_OBJECT_COPY;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1LINK_1CREATE(JNIEnv *env, jclass cls)
{
return H5P_LINK_CREATE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1LINK_1ACCESS(JNIEnv *env, jclass cls)
{
return H5P_LINK_ACCESS;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1VOL_1INITIALIZE(JNIEnv *env, jclass cls)
{
return H5P_VOL_INITIALIZE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1FILE_1CREATE_1DEFAULT(JNIEnv *env, jclass cls)
{
return H5P_FILE_CREATE_DEFAULT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1FILE_1ACCESS_1DEFAULT(JNIEnv *env, jclass cls)
{
return H5P_FILE_ACCESS_DEFAULT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1DATASET_1CREATE_1DEFAULT(JNIEnv *env, jclass cls)
{
return H5P_DATASET_CREATE_DEFAULT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1DATASET_1ACCESS_1DEFAULT(JNIEnv *env, jclass cls)
{
return H5P_DATASET_ACCESS_DEFAULT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1DATASET_1XFER_1DEFAULT(JNIEnv *env, jclass cls)
{
return H5P_DATASET_XFER_DEFAULT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1FILE_1MOUNT_1DEFAULT(JNIEnv *env, jclass cls)
{
return H5P_FILE_MOUNT_DEFAULT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1GROUP_1CREATE_1DEFAULT(JNIEnv *env, jclass cls)
{
return H5P_GROUP_CREATE_DEFAULT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1GROUP_1ACCESS_1DEFAULT(JNIEnv *env, jclass cls)
{
return H5P_GROUP_ACCESS_DEFAULT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1DATATYPE_1CREATE_1DEFAULT(JNIEnv *env, jclass cls)
{
return H5P_DATATYPE_CREATE_DEFAULT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1DATATYPE_1ACCESS_1DEFAULT(JNIEnv *env, jclass cls)
{
return H5P_DATATYPE_ACCESS_DEFAULT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1ATTRIBUTE_1CREATE_1DEFAULT(JNIEnv *env, jclass cls)
{
return H5P_ATTRIBUTE_CREATE_DEFAULT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1ATTRIBUTE_1ACCESS_1DEFAULT(JNIEnv *env, jclass cls)
{
return H5P_ATTRIBUTE_ACCESS_DEFAULT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1OBJECT_1COPY_1DEFAULT(JNIEnv *env, jclass cls)
{
return H5P_OBJECT_COPY_DEFAULT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1LINK_1CREATE_1DEFAULT(JNIEnv *env, jclass cls)
{
return H5P_LINK_CREATE_DEFAULT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1LINK_1ACCESS_1DEFAULT(JNIEnv *env, jclass cls)
{
return H5P_LINK_ACCESS_DEFAULT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1VOL_1INITIALIZE_1DEFAULT(JNIEnv *env, jclass cls)
{
return H5P_VOL_INITIALIZE_DEFAULT;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1CRT_1ORDER_1TRACKED(JNIEnv *env, jclass cls)
{
return H5P_CRT_ORDER_TRACKED;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1CRT_1ORDER_1INDEXED(JNIEnv *env, jclass cls)
{
return H5P_CRT_ORDER_INDEXED;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1DEFAULT(JNIEnv *env, jclass cls)
{
return H5P_DEFAULT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5P_1NO_1CLASS(JNIEnv *env, jclass cls)
{
return H5P_ROOT;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5PL_1TYPE_1ERROR(JNIEnv *env, jclass cls)
{
return H5PL_TYPE_ERROR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5PL_1TYPE_1FILTER(JNIEnv *env, jclass cls)
{
return H5PL_TYPE_FILTER;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5PL_1TYPE_1VOL(JNIEnv *env, jclass cls)
{
return H5PL_TYPE_VOL;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5PL_1TYPE_1NONE(JNIEnv *env, jclass cls)
{
return H5PL_TYPE_NONE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5PL_1FILTER_1PLUGIN(JNIEnv *env, jclass cls)
{
return H5PL_FILTER_PLUGIN;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5PL_1VOL_1PLUGIN(JNIEnv *env, jclass cls)
{
return H5PL_VOL_PLUGIN;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5PL_1ALL_1PLUGIN(JNIEnv *env, jclass cls)
{
return H5PL_ALL_PLUGIN;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5R_1BADTYPE(JNIEnv *env, jclass cls)
{
return H5R_BADTYPE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5R_1MAXTYPE(JNIEnv *env, jclass cls)
{
return H5R_MAXTYPE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5R_1REF_1BUF_1SIZE(JNIEnv *env, jclass cls)
{
return H5R_REF_BUF_SIZE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5R_1OBJ_1REF_1BUF_1SIZE(JNIEnv *env, jclass cls)
{
return H5R_OBJ_REF_BUF_SIZE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5R_1DSET_1REG_1REF_1BUF_1SIZE(JNIEnv *env, jclass cls)
{
return H5R_DSET_REG_REF_BUF_SIZE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5R_1ATTR(JNIEnv *env, jclass cls)
{
return H5R_ATTR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5R_1OBJECT(JNIEnv *env, jclass cls)
{
return H5R_OBJECT;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5R_1OBJECT1(JNIEnv *env, jclass cls)
{
return H5R_OBJECT1;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5R_1OBJECT2(JNIEnv *env, jclass cls)
{
return H5R_OBJECT2;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5R_1DATASET_1REGION(JNIEnv *env, jclass cls)
{
return H5R_DATASET_REGION;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5R_1DATASET_1REGION1(JNIEnv *env, jclass cls)
{
return H5R_DATASET_REGION1;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5R_1DATASET_1REGION2(JNIEnv *env, jclass cls)
{
return H5R_DATASET_REGION2;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5S_1ALL(JNIEnv *env, jclass cls)
{
return H5S_ALL;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5S_1MAX_1RANK(JNIEnv *env, jclass cls)
{
return H5S_MAX_RANK;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5S_1NO_1CLASS(JNIEnv *env, jclass cls)
{
return H5S_NO_CLASS;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5S_1NULL(JNIEnv *env, jclass cls)
{
return H5S_NULL;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5S_1SCALAR(JNIEnv *env, jclass cls)
{
return H5S_SCALAR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5S_1SEL_1ALL(JNIEnv *env, jclass cls)
{
return H5S_SEL_ALL;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5S_1SEL_1ERROR(JNIEnv *env, jclass cls)
{
return H5S_SEL_ERROR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5S_1SEL_1HYPERSLABS(JNIEnv *env, jclass cls)
{
return H5S_SEL_HYPERSLABS;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5S_1SEL_1N(JNIEnv *env, jclass cls)
{
return H5S_SEL_N;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5S_1SEL_1NONE(JNIEnv *env, jclass cls)
{
return H5S_SEL_NONE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5S_1SEL_1POINTS(JNIEnv *env, jclass cls)
{
return H5S_SEL_POINTS;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5S_1SELECT_1AND(JNIEnv *env, jclass cls)
{
return H5S_SELECT_AND;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5S_1SELECT_1APPEND(JNIEnv *env, jclass cls)
{
return H5S_SELECT_APPEND;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5S_1SELECT_1INVALID(JNIEnv *env, jclass cls)
{
return H5S_SELECT_INVALID;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5S_1SELECT_1NOOP(JNIEnv *env, jclass cls)
{
return H5S_SELECT_NOOP;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5S_1SELECT_1NOTA(JNIEnv *env, jclass cls)
{
return H5S_SELECT_NOTA;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5S_1SELECT_1NOTB(JNIEnv *env, jclass cls)
{
return H5S_SELECT_NOTB;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5S_1SELECT_1OR(JNIEnv *env, jclass cls)
{
return H5S_SELECT_OR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5S_1SELECT_1PREPEND(JNIEnv *env, jclass cls)
{
return H5S_SELECT_PREPEND;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5S_1SELECT_1SET(JNIEnv *env, jclass cls)
{
return H5S_SELECT_SET;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5S_1SELECT_1XOR(JNIEnv *env, jclass cls)
{
return H5S_SELECT_XOR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5S_1SIMPLE(JNIEnv *env, jclass cls)
{
return H5S_SIMPLE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5S_1UNLIMITED(JNIEnv *env, jclass cls)
{
return (jint)H5S_UNLIMITED;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1ALPHA_1B16(JNIEnv *env, jclass cls)
{
return H5T_ALPHA_B16;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1ALPHA_1B32(JNIEnv *env, jclass cls)
{
return H5T_ALPHA_B32;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1ALPHA_1B64(JNIEnv *env, jclass cls)
{
return H5T_ALPHA_B64;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1ALPHA_1B8(JNIEnv *env, jclass cls)
{
return H5T_ALPHA_B8;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1ALPHA_1F32(JNIEnv *env, jclass cls)
{
return H5T_ALPHA_F32;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1ALPHA_1F64(JNIEnv *env, jclass cls)
{
return H5T_ALPHA_F64;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1ALPHA_1I16(JNIEnv *env, jclass cls)
{
return H5T_ALPHA_I16;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1ALPHA_1I32(JNIEnv *env, jclass cls)
{
return H5T_ALPHA_I32;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1ALPHA_1I64(JNIEnv *env, jclass cls)
{
return H5T_ALPHA_I64;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1ALPHA_1I8(JNIEnv *env, jclass cls)
{
return H5T_ALPHA_I8;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1ALPHA_1U16(JNIEnv *env, jclass cls)
{
return H5T_ALPHA_U16;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1ALPHA_1U32(JNIEnv *env, jclass cls)
{
return H5T_ALPHA_U32;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1ALPHA_1U64(JNIEnv *env, jclass cls)
{
return H5T_ALPHA_U64;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1ALPHA_1U8(JNIEnv *env, jclass cls)
{
return H5T_ALPHA_U8;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1ARRAY(JNIEnv *env, jclass cls)
{
return H5T_ARRAY;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1BITFIELD(JNIEnv *env, jclass cls)
{
return H5T_BITFIELD;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1BKG_1NO(JNIEnv *env, jclass cls)
{
return H5T_BKG_NO;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1BKG_1YES(JNIEnv *env, jclass cls)
{
return H5T_BKG_YES;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1C_1S1(JNIEnv *env, jclass cls)
{
return H5T_C_S1;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1COMPLEX(JNIEnv *env, jclass cls)
{
return H5T_COMPLEX;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1COMPOUND(JNIEnv *env, jclass cls)
{
return H5T_COMPOUND;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1CONV_1CONV(JNIEnv *env, jclass cls)
{
return H5T_CONV_CONV;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1CONV_1FREE(JNIEnv *env, jclass cls)
{
return H5T_CONV_FREE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1CONV_1INIT(JNIEnv *env, jclass cls)
{
return H5T_CONV_INIT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1COMPLEX_1IEEE_1F16BE(JNIEnv *env, jclass cls)
{
return H5T_COMPLEX_IEEE_F16BE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1COMPLEX_1IEEE_1F16LE(JNIEnv *env, jclass cls)
{
return H5T_COMPLEX_IEEE_F16LE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1COMPLEX_1IEEE_1F32BE(JNIEnv *env, jclass cls)
{
return H5T_COMPLEX_IEEE_F32BE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1COMPLEX_1IEEE_1F32LE(JNIEnv *env, jclass cls)
{
return H5T_COMPLEX_IEEE_F32LE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1COMPLEX_1IEEE_1F64BE(JNIEnv *env, jclass cls)
{
return H5T_COMPLEX_IEEE_F64BE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1COMPLEX_1IEEE_1F64LE(JNIEnv *env, jclass cls)
{
return H5T_COMPLEX_IEEE_F64LE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1CSET_1ERROR(JNIEnv *env, jclass cls)
{
return H5T_CSET_ERROR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1CSET_1ASCII(JNIEnv *env, jclass cls)
{
return H5T_CSET_ASCII;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1CSET_1UTF8(JNIEnv *env, jclass cls)
{
return H5T_CSET_UTF8;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1CSET_1RESERVED_110(JNIEnv *env, jclass cls)
{
return H5T_CSET_RESERVED_10;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1CSET_1RESERVED_111(JNIEnv *env, jclass cls)
{
return H5T_CSET_RESERVED_11;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1CSET_1RESERVED_112(JNIEnv *env, jclass cls)
{
return H5T_CSET_RESERVED_12;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1CSET_1RESERVED_113(JNIEnv *env, jclass cls)
{
return H5T_CSET_RESERVED_13;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1CSET_1RESERVED_114(JNIEnv *env, jclass cls)
{
return H5T_CSET_RESERVED_14;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1CSET_1RESERVED_115(JNIEnv *env, jclass cls)
{
return H5T_CSET_RESERVED_15;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1CSET_1RESERVED_12(JNIEnv *env, jclass cls)
{
return H5T_CSET_RESERVED_2;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1CSET_1RESERVED_13(JNIEnv *env, jclass cls)
{
return H5T_CSET_RESERVED_3;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1CSET_1RESERVED_14(JNIEnv *env, jclass cls)
{
return H5T_CSET_RESERVED_4;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1CSET_1RESERVED_15(JNIEnv *env, jclass cls)
{
return H5T_CSET_RESERVED_5;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1CSET_1RESERVED_16(JNIEnv *env, jclass cls)
{
return H5T_CSET_RESERVED_6;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1CSET_1RESERVED_17(JNIEnv *env, jclass cls)
{
return H5T_CSET_RESERVED_7;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1CSET_1RESERVED_18(JNIEnv *env, jclass cls)
{
return H5T_CSET_RESERVED_8;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1CSET_1RESERVED_19(JNIEnv *env, jclass cls)
{
return H5T_CSET_RESERVED_9;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1DIR_1ASCEND(JNIEnv *env, jclass cls)
{
return H5T_DIR_ASCEND;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1DIR_1DEFAULT(JNIEnv *env, jclass cls)
{
return H5T_DIR_DEFAULT;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1DIR_1DESCEND(JNIEnv *env, jclass cls)
{
return H5T_DIR_DESCEND;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1ENUM(JNIEnv *env, jclass cls)
{
return H5T_ENUM;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1FLOAT(JNIEnv *env, jclass cls)
{
return H5T_FLOAT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1FORTRAN_1S1(JNIEnv *env, jclass cls)
{
return H5T_FORTRAN_S1;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1IEEE_1F16BE(JNIEnv *env, jclass cls)
{
return H5T_IEEE_F16BE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1IEEE_1F16LE(JNIEnv *env, jclass cls)
{
return H5T_IEEE_F16LE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1IEEE_1F32BE(JNIEnv *env, jclass cls)
{
return H5T_IEEE_F32BE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1IEEE_1F32LE(JNIEnv *env, jclass cls)
{
return H5T_IEEE_F32LE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1IEEE_1F64BE(JNIEnv *env, jclass cls)
{
return H5T_IEEE_F64BE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1IEEE_1F64LE(JNIEnv *env, jclass cls)
{
return H5T_IEEE_F64LE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1FLOAT_1BFLOAT16BE(JNIEnv *env, jclass cls)
{
return H5T_FLOAT_BFLOAT16BE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1FLOAT_1BFLOAT16LE(JNIEnv *env, jclass cls)
{
return H5T_FLOAT_BFLOAT16LE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1FLOAT_1F8E4M3(JNIEnv *env, jclass cls)
{
return H5T_FLOAT_F8E4M3;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1FLOAT_1F8E5M2(JNIEnv *env, jclass cls)
{
return H5T_FLOAT_F8E5M2;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1INTEGER(JNIEnv *env, jclass cls)
{
return H5T_INTEGER;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1INTEL_1B16(JNIEnv *env, jclass cls)
{
return H5T_INTEL_B16;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1INTEL_1B32(JNIEnv *env, jclass cls)
{
return H5T_INTEL_B32;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1INTEL_1B64(JNIEnv *env, jclass cls)
{
return H5T_INTEL_B64;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1INTEL_1B8(JNIEnv *env, jclass cls)
{
return H5T_INTEL_B8;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1INTEL_1F32(JNIEnv *env, jclass cls)
{
return H5T_INTEL_F32;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1INTEL_1F64(JNIEnv *env, jclass cls)
{
return H5T_INTEL_F64;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1INTEL_1I16(JNIEnv *env, jclass cls)
{
return H5T_INTEL_I16;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1INTEL_1I32(JNIEnv *env, jclass cls)
{
return H5T_INTEL_I32;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1INTEL_1I64(JNIEnv *env, jclass cls)
{
return H5T_INTEL_I64;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1INTEL_1I8(JNIEnv *env, jclass cls)
{
return H5T_INTEL_I8;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1INTEL_1U16(JNIEnv *env, jclass cls)
{
return H5T_INTEL_U16;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1INTEL_1U32(JNIEnv *env, jclass cls)
{
return H5T_INTEL_U32;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1INTEL_1U64(JNIEnv *env, jclass cls)
{
return H5T_INTEL_U64;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1INTEL_1U8(JNIEnv *env, jclass cls)
{
return H5T_INTEL_U8;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1MIPS_1B16(JNIEnv *env, jclass cls)
{
return H5T_MIPS_B16;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1MIPS_1B32(JNIEnv *env, jclass cls)
{
return H5T_MIPS_B32;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1MIPS_1B64(JNIEnv *env, jclass cls)
{
return H5T_MIPS_B64;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1MIPS_1B8(JNIEnv *env, jclass cls)
{
return H5T_MIPS_B8;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1MIPS_1F32(JNIEnv *env, jclass cls)
{
return H5T_MIPS_F32;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1MIPS_1F64(JNIEnv *env, jclass cls)
{
return H5T_MIPS_F64;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1MIPS_1I16(JNIEnv *env, jclass cls)
{
return H5T_MIPS_I16;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1MIPS_1I32(JNIEnv *env, jclass cls)
{
return H5T_MIPS_I32;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1MIPS_1I64(JNIEnv *env, jclass cls)
{
return H5T_MIPS_I64;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1MIPS_1I8(JNIEnv *env, jclass cls)
{
return H5T_MIPS_I8;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1MIPS_1U16(JNIEnv *env, jclass cls)
{
return H5T_MIPS_U16;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1MIPS_1U32(JNIEnv *env, jclass cls)
{
return H5T_MIPS_U32;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1MIPS_1U64(JNIEnv *env, jclass cls)
{
return H5T_MIPS_U64;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1MIPS_1U8(JNIEnv *env, jclass cls)
{
return H5T_MIPS_U8;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1B16(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_B16;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1B32(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_B32;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1B64(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_B64;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1B8(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_B8;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1CHAR(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_CHAR;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1DOUBLE(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_DOUBLE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1DOUBLE_1COMPLEX(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_DOUBLE_COMPLEX;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1FLOAT(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_FLOAT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1FLOAT16(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_FLOAT16;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1FLOAT_1COMPLEX(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_FLOAT_COMPLEX;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1HADDR(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_HADDR;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1HBOOL(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_HBOOL;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1HERR(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_HERR;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1HSIZE(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_HSIZE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1HSSIZE(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_HSSIZE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1INT(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_INT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1INT_1FAST16(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_INT_FAST16;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1INT_1FAST32(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_INT_FAST32;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1INT_1FAST64(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_INT_FAST64;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1INT_1FAST8(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_INT_FAST8;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1INT_1LEAST16(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_INT_LEAST16;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1INT_1LEAST32(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_INT_LEAST32;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1INT_1LEAST64(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_INT_LEAST64;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1INT_1LEAST8(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_INT_LEAST8;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1INT16(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_INT16;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1INT32(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_INT32;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1INT64(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_INT64;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1INT8(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_INT8;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1LDOUBLE(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_LDOUBLE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1LLONG(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_LLONG;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1LONG(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_LONG;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1LDOUBLE_1COMPLEX(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_LDOUBLE_COMPLEX;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1OPAQUE(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_OPAQUE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1SCHAR(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_SCHAR;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1SHORT(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_SHORT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1UCHAR(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_UCHAR;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1UINT(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_UINT;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1UINT_1FAST16(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_UINT_FAST16;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1UINT_1FAST32(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_UINT_FAST32;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1UINT_1FAST64(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_UINT_FAST64;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1UINT_1FAST8(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_UINT_FAST8;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1UINT_1LEAST16(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_UINT_LEAST16;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1UINT_1LEAST32(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_UINT_LEAST32;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1UINT_1LEAST64(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_UINT_LEAST64;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1UINT_1LEAST8(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_UINT_LEAST8;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1UINT16(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_UINT16;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1UINT32(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_UINT32;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1UINT64(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_UINT64;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1UINT8(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_UINT8;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1ULLONG(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_ULLONG;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1ULONG(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_ULONG;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NATIVE_1USHORT(JNIEnv *env, jclass cls)
{
return H5T_NATIVE_USHORT;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NCLASSES(JNIEnv *env, jclass cls)
{
return H5T_NCLASSES;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NO_1CLASS(JNIEnv *env, jclass cls)
{
return H5T_NO_CLASS;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NORM_1ERROR(JNIEnv *env, jclass cls)
{
return H5T_NORM_ERROR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NORM_1IMPLIED(JNIEnv *env, jclass cls)
{
return H5T_NORM_IMPLIED;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NORM_1MSBSET(JNIEnv *env, jclass cls)
{
return H5T_NORM_MSBSET;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NORM_1NONE(JNIEnv *env, jclass cls)
{
return H5T_NORM_NONE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NPAD(JNIEnv *env, jclass cls)
{
return H5T_NPAD;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1NSGN(JNIEnv *env, jclass cls)
{
return H5T_NSGN;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1OPAQUE(JNIEnv *env, jclass cls)
{
return H5T_OPAQUE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1OPAQUE_1TAG_1MAX(JNIEnv *env, jclass cls)
{
return H5T_OPAQUE_TAG_MAX;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1ORDER_1BE(JNIEnv *env, jclass cls)
{
return H5T_ORDER_BE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1ORDER_1ERROR(JNIEnv *env, jclass cls)
{
return H5T_ORDER_ERROR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1ORDER_1LE(JNIEnv *env, jclass cls)
{
return H5T_ORDER_LE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1ORDER_1NONE(JNIEnv *env, jclass cls)
{
return H5T_ORDER_NONE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1ORDER_1VAX(JNIEnv *env, jclass cls)
{
return H5T_ORDER_VAX;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1PAD_1BACKGROUND(JNIEnv *env, jclass cls)
{
return H5T_PAD_BACKGROUND;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1PAD_1ERROR(JNIEnv *env, jclass cls)
{
return H5T_PAD_ERROR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1PAD_1ONE(JNIEnv *env, jclass cls)
{
return H5T_PAD_ONE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1PAD_1ZERO(JNIEnv *env, jclass cls)
{
return H5T_PAD_ZERO;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1PERS_1DONTCARE(JNIEnv *env, jclass cls)
{
return H5T_PERS_DONTCARE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1PERS_1HARD(JNIEnv *env, jclass cls)
{
return H5T_PERS_HARD;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1PERS_1SOFT(JNIEnv *env, jclass cls)
{
return H5T_PERS_SOFT;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1REFERENCE(JNIEnv *env, jclass cls)
{
return H5T_REFERENCE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1SGN_12(JNIEnv *env, jclass cls)
{
return H5T_SGN_2;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1SGN_1ERROR(JNIEnv *env, jclass cls)
{
return H5T_SGN_ERROR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1SGN_1NONE(JNIEnv *env, jclass cls)
{
return H5T_SGN_NONE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1B16BE(JNIEnv *env, jclass cls)
{
return H5T_STD_B16BE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1B16LE(JNIEnv *env, jclass cls)
{
return H5T_STD_B16LE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1B32BE(JNIEnv *env, jclass cls)
{
return H5T_STD_B32BE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1B32LE(JNIEnv *env, jclass cls)
{
return H5T_STD_B32LE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1B64BE(JNIEnv *env, jclass cls)
{
return H5T_STD_B64BE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1B64LE(JNIEnv *env, jclass cls)
{
return H5T_STD_B64LE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1B8BE(JNIEnv *env, jclass cls)
{
return H5T_STD_B8BE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1B8LE(JNIEnv *env, jclass cls)
{
return H5T_STD_B8LE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1I16BE(JNIEnv *env, jclass cls)
{
return H5T_STD_I16BE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1I16LE(JNIEnv *env, jclass cls)
{
return H5T_STD_I16LE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1I32BE(JNIEnv *env, jclass cls)
{
return H5T_STD_I32BE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1I32LE(JNIEnv *env, jclass cls)
{
return H5T_STD_I32LE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1I64BE(JNIEnv *env, jclass cls)
{
return H5T_STD_I64BE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1I64LE(JNIEnv *env, jclass cls)
{
return H5T_STD_I64LE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1I8BE(JNIEnv *env, jclass cls)
{
return H5T_STD_I8BE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1I8LE(JNIEnv *env, jclass cls)
{
return H5T_STD_I8LE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1REF_1DSETREG(JNIEnv *env, jclass cls)
{
return H5T_STD_REF_DSETREG;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1REF_1OBJ(JNIEnv *env, jclass cls)
{
return H5T_STD_REF_OBJ;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1REF(JNIEnv *env, jclass cls)
{
return H5T_STD_REF;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1U16BE(JNIEnv *env, jclass cls)
{
return H5T_STD_U16BE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1U16LE(JNIEnv *env, jclass cls)
{
return H5T_STD_U16LE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1U32BE(JNIEnv *env, jclass cls)
{
return H5T_STD_U32BE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1U32LE(JNIEnv *env, jclass cls)
{
return H5T_STD_U32LE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1U64BE(JNIEnv *env, jclass cls)
{
return H5T_STD_U64BE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1U64LE(JNIEnv *env, jclass cls)
{
return H5T_STD_U64LE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1U8BE(JNIEnv *env, jclass cls)
{
return H5T_STD_U8BE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STD_1U8LE(JNIEnv *env, jclass cls)
{
return H5T_STD_U8LE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STR_1ERROR(JNIEnv *env, jclass cls)
{
return H5T_STR_ERROR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STR_1NULLPAD(JNIEnv *env, jclass cls)
{
return H5T_STR_NULLPAD;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STR_1NULLTERM(JNIEnv *env, jclass cls)
{
return H5T_STR_NULLTERM;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STR_1RESERVED_110(JNIEnv *env, jclass cls)
{
return H5T_STR_RESERVED_10;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STR_1RESERVED_111(JNIEnv *env, jclass cls)
{
return H5T_STR_RESERVED_11;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STR_1RESERVED_112(JNIEnv *env, jclass cls)
{
return H5T_STR_RESERVED_12;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STR_1RESERVED_113(JNIEnv *env, jclass cls)
{
return H5T_STR_RESERVED_13;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STR_1RESERVED_114(JNIEnv *env, jclass cls)
{
return H5T_STR_RESERVED_14;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STR_1RESERVED_115(JNIEnv *env, jclass cls)
{
return H5T_STR_RESERVED_15;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STR_1RESERVED_13(JNIEnv *env, jclass cls)
{
return H5T_STR_RESERVED_3;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STR_1RESERVED_14(JNIEnv *env, jclass cls)
{
return H5T_STR_RESERVED_4;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STR_1RESERVED_15(JNIEnv *env, jclass cls)
{
return H5T_STR_RESERVED_5;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STR_1RESERVED_16(JNIEnv *env, jclass cls)
{
return H5T_STR_RESERVED_6;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STR_1RESERVED_17(JNIEnv *env, jclass cls)
{
return H5T_STR_RESERVED_7;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STR_1RESERVED_18(JNIEnv *env, jclass cls)
{
return H5T_STR_RESERVED_8;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STR_1RESERVED_19(JNIEnv *env, jclass cls)
{
return H5T_STR_RESERVED_9;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STR_1SPACEPAD(JNIEnv *env, jclass cls)
{
return H5T_STR_SPACEPAD;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1STRING(JNIEnv *env, jclass cls)
{
return H5T_STRING;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1TIME(JNIEnv *env, jclass cls)
{
return H5T_TIME;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1UNIX_1D32BE(JNIEnv *env, jclass cls)
{
return H5T_UNIX_D32BE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1UNIX_1D32LE(JNIEnv *env, jclass cls)
{
return H5T_UNIX_D32LE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1UNIX_1D64BE(JNIEnv *env, jclass cls)
{
return H5T_UNIX_D64BE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1UNIX_1D64LE(JNIEnv *env, jclass cls)
{
return H5T_UNIX_D64LE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1VARIABLE(JNIEnv *env, jclass cls)
{
return (int)H5T_VARIABLE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1VLEN(JNIEnv *env, jclass cls)
{
return H5T_VLEN;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5T_1VL_1T(JNIEnv *env, jclass cls)
{
return sizeof(hvl_t);
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5VL_1CAP_1FLAG_1NONE(JNIEnv *env, jclass cls)
{
return H5VL_CAP_FLAG_NONE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5VL_1CAP_1FLAG_1THREADSAFE(JNIEnv *env, jclass cls)
{
return H5VL_CAP_FLAG_THREADSAFE;
}
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5VL_1NATIVE(JNIEnv *env, jclass cls)
{
return H5VL_NATIVE;
}
JNIEXPORT jobject JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5VL_1NATIVE_1NAME(JNIEnv *env, jclass cls)
{
return (jstring)ENVPTR->NewStringUTF(ENVONLY, H5VL_NATIVE_NAME);
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5VL_1NATIVE_1VALUE(JNIEnv *env, jclass cls)
{
return H5VL_NATIVE_VALUE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5VL_1NATIVE_1VERSION(JNIEnv *env, jclass cls)
{
return H5VL_NATIVE_VERSION;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5_1VOL_1INVALID(JNIEnv *env, jclass cls)
{
return H5_VOL_INVALID;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5_1VOL_1NATIVE(JNIEnv *env, jclass cls)
{
return H5_VOL_NATIVE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5_1VOL_1RESERVED(JNIEnv *env, jclass cls)
{
return H5_VOL_RESERVED;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5_1VOL_1MAX(JNIEnv *env, jclass cls)
{
return H5_VOL_MAX;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1CB_1CONT(JNIEnv *env, jclass cls)
{
return H5Z_CB_CONT;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1CB_1ERROR(JNIEnv *env, jclass cls)
{
return H5Z_CB_ERROR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1CB_1FAIL(JNIEnv *env, jclass cls)
{
return H5Z_CB_FAIL;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1CB_1NO(JNIEnv *env, jclass cls)
{
return H5Z_CB_NO;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1DISABLE_1EDC(JNIEnv *env, jclass cls)
{
return H5Z_DISABLE_EDC;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1ENABLE_1EDC(JNIEnv *env, jclass cls)
{
return H5Z_ENABLE_EDC;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1ERROR_1EDC(JNIEnv *env, jclass cls)
{
return H5Z_ERROR_EDC;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1FILTER_1CONFIG_1DECODE_1ENABLED(JNIEnv *env, jclass cls)
{
return H5Z_FILTER_CONFIG_DECODE_ENABLED;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1FILTER_1CONFIG_1ENCODE_1ENABLED(JNIEnv *env, jclass cls)
{
return H5Z_FILTER_CONFIG_ENCODE_ENABLED;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1FILTER_1DEFLATE(JNIEnv *env, jclass cls)
{
return H5Z_FILTER_DEFLATE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1FILTER_1ERROR(JNIEnv *env, jclass cls)
{
return H5Z_FILTER_ERROR;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1FILTER_1FLETCHER32(JNIEnv *env, jclass cls)
{
return H5Z_FILTER_FLETCHER32;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1FILTER_1MAX(JNIEnv *env, jclass cls)
{
return H5Z_FILTER_MAX;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1FILTER_1NBIT(JNIEnv *env, jclass cls)
{
return H5Z_FILTER_NBIT;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1FILTER_1NONE(JNIEnv *env, jclass cls)
{
return H5Z_FILTER_NONE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1FILTER_1RESERVED(JNIEnv *env, jclass cls)
{
return H5Z_FILTER_RESERVED;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1FILTER_1SCALEOFFSET(JNIEnv *env, jclass cls)
{
return H5Z_FILTER_SCALEOFFSET;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1FILTER_1SHUFFLE(JNIEnv *env, jclass cls)
{
return H5Z_FILTER_SHUFFLE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1FILTER_1SZIP(JNIEnv *env, jclass cls)
{
return H5Z_FILTER_SZIP;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1FLAG_1DEFMASK(JNIEnv *env, jclass cls)
{
return H5Z_FLAG_DEFMASK;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1FLAG_1INVMASK(JNIEnv *env, jclass cls)
{
return H5Z_FLAG_INVMASK;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1FLAG_1MANDATORY(JNIEnv *env, jclass cls)
{
return H5Z_FLAG_MANDATORY;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1FLAG_1OPTIONAL(JNIEnv *env, jclass cls)
{
return H5Z_FLAG_OPTIONAL;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1FLAG_1REVERSE(JNIEnv *env, jclass cls)
{
return H5Z_FLAG_REVERSE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1FLAG_1SKIP_1EDC(JNIEnv *env, jclass cls)
{
return H5Z_FLAG_SKIP_EDC;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1MAX_1NFILTERS(JNIEnv *env, jclass cls)
{
return H5Z_MAX_NFILTERS;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1NO_1EDC(JNIEnv *env, jclass cls)
{
return H5Z_NO_EDC;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1SO_1INT_1MINBITS_1DEFAULT(JNIEnv *env, jclass cls)
{
return H5Z_SO_INT_MINBITS_DEFAULT;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1SO_1FLOAT_1DSCALE(JNIEnv *env, jclass cls)
{
return H5Z_SO_FLOAT_DSCALE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1SO_1FLOAT_1ESCALE(JNIEnv *env, jclass cls)
{
return H5Z_SO_FLOAT_ESCALE;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1SO_1INT(JNIEnv *env, jclass cls)
{
return H5Z_SO_INT;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1SHUFFLE_1USER_1NPARMS(JNIEnv *env, jclass cls)
{
return H5Z_SHUFFLE_USER_NPARMS;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1SHUFFLE_1TOTAL_1NPARMS(JNIEnv *env, jclass cls)
{
return H5Z_SHUFFLE_TOTAL_NPARMS;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1SZIP_1USER_1NPARMS(JNIEnv *env, jclass cls)
{
return H5Z_SZIP_USER_NPARMS;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1SZIP_1TOTAL_1NPARMS(JNIEnv *env, jclass cls)
{
return H5Z_SZIP_TOTAL_NPARMS;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1SZIP_1PARM_1MASK(JNIEnv *env, jclass cls)
{
return H5Z_SZIP_PARM_MASK;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1SZIP_1PARM_1PPB(JNIEnv *env, jclass cls)
{
return H5Z_SZIP_PARM_PPB;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1SZIP_1PARM_1BPP(JNIEnv *env, jclass cls)
{
return H5Z_SZIP_PARM_BPP;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1SZIP_1PARM_1PPS(JNIEnv *env, jclass cls)
{
return H5Z_SZIP_PARM_PPS;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1NBIT_1USER_1NPARMS(JNIEnv *env, jclass cls)
{
return H5Z_NBIT_USER_NPARMS;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1SCALEOFFSET_1USER_1NPARMS(JNIEnv *env, jclass cls)
{
return H5Z_SCALEOFFSET_USER_NPARMS;
}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1FILTER_1ALL(JNIEnv *env, jclass cls)
{
return H5Z_FILTER_ALL;
}
H5_WARN_UNUSED_PARAMETER_ON
H5_WARN_MISSING_PROTOTYPE_ON
#ifdef __cplusplus
} /* end extern "C" */
#endif /* __cplusplus */
+201
View File
@@ -0,0 +1,201 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*
* This code is the C-interface called by Java programs to access the
* general library functions of the HDF5 library.
*
* Each routine wraps a single HDF entry point, generally with the
* analogous arguments and return codes.
*
*/
#include "hdf5.h"
#include <jni.h>
#include "h5jni.h"
#include "h5Imp.h"
/*
* Pointer to the JNI's Virtual Machine; used for callback functions.
*/
/* extern JavaVM *jvm; */
/*
* Class: hdf_hdf5lib_H5
* Method: H5open
* Signature: ()I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5open(JNIEnv *env, jclass clss)
{
herr_t retVal = FAIL;
UNUSED(clss);
if ((retVal = H5open()) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jint)retVal;
} /* end Java_hdf_hdf5lib_H5_H5open */
/*
* Class: hdf_hdf5lib_H5
* Method: H5close
* Signature: ()I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5close(JNIEnv *env, jclass clss)
{
herr_t retVal = FAIL;
UNUSED(clss);
if ((retVal = H5close()) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jint)retVal;
} /* end Java_hdf_hdf5lib_H5_H5close */
/*
* Class: hdf_hdf5lib_H5
* Method: H5dont_atexit
* Signature: ()I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5dont_1atexit(JNIEnv *env, jclass clss)
{
herr_t retVal = FAIL;
UNUSED(clss);
if ((retVal = H5dont_atexit()) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jint)retVal;
} /* end Java_hdf_hdf5lib_H5_H5dont_1atexit */
/*
* Class: hdf_hdf5lib_H5
* Method: H5get_libversion
* Signature: ([I)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5get_1libversion(JNIEnv *env, jclass clss, jintArray libversion)
{
jboolean libversionArrayIsCopy;
jint *libversionArray = NULL;
herr_t status = FAIL;
UNUSED(clss);
if (libversion == NULL)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5get_libversion: libversion is NULL");
PIN_INT_ARRAY(ENVONLY, libversion, libversionArray, &libversionArrayIsCopy,
"H5get_libversion: libversion input not pinned");
if ((status = H5get_libversion((unsigned *)&(libversionArray[0]), (unsigned *)&(libversionArray[1]),
(unsigned *)&(libversionArray[2]))) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (libversionArray)
UNPIN_INT_ARRAY(ENVONLY, libversion, libversionArray, (status < 0) ? JNI_ABORT : 0);
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5get_1libversion */
/*
* Class: hdf_hdf5lib_H5
* Method: H5check_version
* Signature: (III)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5check_1version(JNIEnv *env, jclass clss, jint majnum, jint minnum, jint relnum)
{
UNUSED(env);
UNUSED(clss);
return (jint)H5check_version((unsigned)majnum, (unsigned)minnum, (unsigned)relnum);
} /* end Java_hdf_hdf5lib_H5_H5check_1version */
/*
* Class: hdf_hdf5lib_H5
* Method: H5garbage_collect
* Signature: ()I
*
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5garbage_1collect(JNIEnv *env, jclass clss)
{
herr_t retVal = FAIL;
UNUSED(clss);
if ((retVal = H5garbage_collect()) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jint)retVal;
} /* end Java_hdf_hdf5lib_H5_H5garbage_1collect */
/*
* Class: hdf_hdf5lib_H5
* Method: H5set_free_list_limits
* Signature: (IIIIII)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5set_1free_1list_1limits(JNIEnv *env, jclass clss, jint reg_global_lim,
jint reg_list_lim, jint arr_global_lim, jint arr_list_lim,
jint blk_global_lim, jint blk_list_lim)
{
herr_t retVal = FAIL;
UNUSED(clss);
if ((retVal = H5set_free_list_limits((int)reg_global_lim, (int)reg_list_lim, (int)arr_global_lim,
(int)arr_list_lim, (int)blk_global_lim, (int)blk_list_lim)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jint)retVal;
} /* end Java_hdf_hdf5lib_H5_H5set_1free_1list_1limits */
/*
* Class: hdf_hdf5lib_H5
* Method: H5is_library_threadsafe
* Signature: ()Z
*/
JNIEXPORT jboolean JNICALL
Java_hdf_hdf5lib_H5_H5is_1library_1threadsafe(JNIEnv *env, jclass clss)
{
bool is_ts = false;
UNUSED(clss);
if (H5is_library_threadsafe(&is_ts) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jboolean)is_ts;
} /* end Java_hdf_hdf5lib_H5_H5is_1library_1threadsafe */
#ifdef __cplusplus
} /* end extern "C" */
#endif /* __cplusplus */
+85
View File
@@ -0,0 +1,85 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <jni.h>
/* Header for class hdf_hdf5lib_H5_H5 */
#ifndef Included_hdf_hdf5lib_H5_H5
#define Included_hdf_hdf5lib_H5_H5
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*
* Class: hdf_hdf5lib_H5
* Method: H5open
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5open(JNIEnv *, jclass);
/*
* Class: hdf_hdf5lib_H5
* Method: H5close
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5close(JNIEnv *, jclass);
/*
* Class: hdf_hdf5lib_H5
* Method: H5dont_atexit
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5dont_1atexit(JNIEnv *, jclass);
/*
* Class: hdf_hdf5lib_H5
* Method: H5get_libversion
* Signature: ([I)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5get_1libversion(JNIEnv *, jclass, jintArray);
/*
* Class: hdf_hdf5lib_H5
* Method: H5check_version
* Signature: (III)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5check_1version(JNIEnv *, jclass, jint, jint, jint);
/*
* Class: hdf_hdf5lib_H5
* Method: H5garbage_collect
* Signature: ()I
*
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5garbage_1collect(JNIEnv *, jclass);
/*
* Class: hdf_hdf5lib_H5
* Method: H5set_free_list_limits
* Signature: (IIIIII)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5set_1free_1list_1limits(JNIEnv *, jclass, jint, jint, jint, jint,
jint, jint);
/*
* Class: hdf_hdf5lib_H5
* Method: H5is_library_threadsafe
* Signature: ()Z
*/
JNIEXPORT jboolean JNICALL Java_hdf_hdf5lib_H5_H5is_1library_1threadsafe(JNIEnv *, jclass);
#ifdef __cplusplus
} /* end extern "C" */
#endif /* __cplusplus */
#endif /* Included_hdf_hdf5lib_H5_H5 */
+2561
View File
@@ -0,0 +1,2561 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include <jni.h>
#include <stdlib.h>
#include <string.h>
#include "hdf5.h"
#include "h5util.h"
#include "h5jni.h"
#include "h5aImp.h"
/*
* Pointer to the JNI's Virtual Machine; used for callback functions.
*/
extern JavaVM *jvm;
typedef struct _cb_wrapper {
jobject visit_callback;
jobject op_data;
} cb_wrapper;
/********************/
/* Local Prototypes */
/********************/
static herr_t H5AwriteVL_asstr(JNIEnv *env, hid_t attr_id, hid_t mem_id, jobjectArray buf);
static herr_t H5AwriteVL_str(JNIEnv *env, hid_t attr_id, hid_t mem_id, jobjectArray buf);
static herr_t H5AreadVL_asstr(JNIEnv *env, hid_t attr_id, hid_t mem_id, jobjectArray buf);
static herr_t H5AreadVL_str(JNIEnv *env, hid_t attr_id, hid_t mem_id, jobjectArray buf);
static herr_t H5A_iterate_cb(hid_t g_id, const char *name, const H5A_info_t *info, void *cb_data);
/********************/
/* Local Macros */
/********************/
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Acreate
* Signature: (JLjava/lang/String;JJJ)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Acreate(JNIEnv *env, jclass clss, jlong loc_id, jstring name, jlong type_id,
jlong space_id, jlong create_plist)
{
const char *attrName = NULL;
hid_t attr_id = H5I_INVALID_HID;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Acreate: attribute name is NULL");
PIN_JAVA_STRING(ENVONLY, name, attrName, NULL, "H5Acreate: attribute name not pinned");
if ((attr_id = H5Acreate2((hid_t)loc_id, attrName, (hid_t)type_id, (hid_t)space_id, (hid_t)create_plist,
(hid_t)H5P_DEFAULT)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (attrName)
UNPIN_JAVA_STRING(ENVONLY, name, attrName);
return (jlong)attr_id;
} /* end Java_hdf_hdf5lib_H5__1H5Acreate */
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Aopen_name
* Signature: (JLjava/lang/String;)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Aopen_1name(JNIEnv *env, jclass clss, jlong loc_id, jstring name)
{
#ifndef H5_NO_DEPRECATED_SYMBOLS
const char *attrName = NULL;
#endif
hid_t attr_id = H5I_INVALID_HID;
UNUSED(clss);
#ifdef H5_NO_DEPRECATED_SYMBOLS
UNUSED(loc_id);
UNUSED(name);
H5_UNIMPLEMENTED(ENVONLY, "H5Aopen_name: not implemented");
#else
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Aopen_name: attribute name is null");
PIN_JAVA_STRING(ENVONLY, name, attrName, NULL, "H5Aopen_name: attribute name not pinned");
if ((attr_id = H5Aopen_name((hid_t)loc_id, attrName)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
#endif
done:
#ifndef H5_NO_DEPRECATED_SYMBOLS
if (attrName)
UNPIN_JAVA_STRING(ENVONLY, name, attrName);
#endif
return (jlong)attr_id;
} /* end Java_hdf_hdf5lib_H5__1H5Aopen_1name */
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Aopen_idx
* Signature: (JI)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Aopen_1idx(JNIEnv *env, jclass clss, jlong loc_id, jint idx)
{
hid_t attr_id = H5I_INVALID_HID;
UNUSED(clss);
#ifdef H5_NO_DEPRECATED_SYMBOLS
UNUSED(loc_id);
UNUSED(idx);
H5_UNIMPLEMENTED(ENVONLY, "H5Aopen_idx: not implemented");
#else
if ((attr_id = H5Aopen_idx((hid_t)loc_id, (unsigned int)idx)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
#endif
done:
return (jlong)attr_id;
} /* end Java_hdf_hdf5lib_H5__1H5Aopen_1idx */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aread
* Signature: (JJ[BZ)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Aread(JNIEnv *env, jclass clss, jlong attr_id, jlong mem_type_id, jbyteArray buf,
jboolean isCriticalPinning)
{
jboolean readBufIsCopy;
jbyte *readBuf = NULL;
hsize_t dims[H5S_MAX_RANK];
hid_t sid = H5I_INVALID_HID;
size_t typeSize;
H5T_class_t type_class;
jsize vl_array_len = 0; // Only used by vl_data_class types
htri_t vl_data_class;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Aread: read buffer is NULL");
if ((vl_data_class = h5str_detect_vlen(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (vl_data_class) {
/* Get size of data array */
if ((vl_array_len = ENVPTR->GetArrayLength(ENVONLY, buf)) < 0)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Aread: readBuf length < 0");
if (!(typeSize = H5Tget_size(mem_type_id)))
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (readBuf = calloc((size_t)vl_array_len, typeSize)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Aread: failed to allocate raw VL read buffer");
}
else {
if (isCriticalPinning) {
PIN_BYTE_ARRAY_CRITICAL(ENVONLY, buf, readBuf, &readBufIsCopy,
"H5Aread: read buffer not critically pinned");
}
else {
PIN_BYTE_ARRAY(ENVONLY, buf, readBuf, &readBufIsCopy, "H5Aread: read buffer not pinned");
}
}
if ((status = H5Aread((hid_t)attr_id, (hid_t)mem_type_id, (void *)readBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (vl_data_class) {
if ((type_class = H5Tget_class((hid_t)mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
translate_rbuf(env, buf, mem_type_id, type_class, vl_array_len, readBuf);
}
done:
if (readBuf) {
if ((status >= 0) && vl_data_class) {
dims[0] = (hsize_t)vl_array_len;
if ((sid = H5Screate_simple(1, dims, NULL)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
H5Treclaim(attr_id, sid, H5P_DEFAULT, readBuf);
if (sid >= 0)
H5Sclose(sid);
}
if (vl_data_class) {
free(readBuf);
}
else {
if (isCriticalPinning) {
UNPIN_ARRAY_CRITICAL(ENVONLY, buf, readBuf, (status < 0) ? JNI_ABORT : 0);
}
else {
UNPIN_BYTE_ARRAY(ENVONLY, buf, readBuf, (status < 0) ? JNI_ABORT : 0);
}
}
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Aread */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Awrite
* Signature: (JJ[BZ)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Awrite(JNIEnv *env, jclass clss, jlong attr_id, jlong mem_type_id, jbyteArray buf,
jboolean isCriticalPinning)
{
jboolean writeBufIsCopy;
jbyte *writeBuf = NULL;
hsize_t dims[H5S_MAX_RANK];
hid_t sid = H5I_INVALID_HID;
size_t typeSize;
H5T_class_t type_class;
jsize vl_array_len = 0; // Only used by vl_data_class types
htri_t vl_data_class;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Awrite: write buffer is NULL");
if ((vl_data_class = h5str_detect_vlen(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (vl_data_class) {
/* Get size of data array */
if ((vl_array_len = ENVPTR->GetArrayLength(ENVONLY, buf)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Awrite: write buffer length < 0");
}
if (!(typeSize = H5Tget_size(mem_type_id)))
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (writeBuf = calloc((size_t)vl_array_len, typeSize)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Awrite: failed to allocate raw VL write buffer");
}
else {
if (isCriticalPinning) {
PIN_BYTE_ARRAY_CRITICAL(ENVONLY, buf, writeBuf, &writeBufIsCopy,
"H5Awrite: write buffer not critically pinned");
}
else {
PIN_BYTE_ARRAY(ENVONLY, buf, writeBuf, &writeBufIsCopy, "H5Awrite: write buffer not pinned");
}
}
if (vl_data_class) {
if ((type_class = H5Tget_class((hid_t)mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
translate_wbuf(ENVONLY, buf, mem_type_id, type_class, vl_array_len, writeBuf);
}
if ((status = H5Awrite((hid_t)attr_id, (hid_t)mem_type_id, writeBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (writeBuf) {
if ((status >= 0) && vl_data_class) {
dims[0] = (hsize_t)vl_array_len;
if ((sid = H5Screate_simple(1, dims, NULL)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
H5Treclaim(attr_id, sid, H5P_DEFAULT, writeBuf);
}
if (vl_data_class) {
free(writeBuf);
}
else {
if (isCriticalPinning) {
UNPIN_ARRAY_CRITICAL(ENVONLY, buf, writeBuf, (status < 0) ? JNI_ABORT : 0);
}
else {
UNPIN_BYTE_ARRAY(ENVONLY, buf, writeBuf, (status < 0) ? JNI_ABORT : 0);
}
}
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Awrite */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aread_short
* Signature: (JJ[SZ)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Aread_1short(JNIEnv *env, jclass clss, jlong attr_id, jlong mem_type_id,
jshortArray buf, jboolean isCriticalPinning)
{
jboolean readBufIsCopy;
jshort *readBuf = NULL;
hsize_t dims[H5S_MAX_RANK];
hid_t sid = H5I_INVALID_HID;
jsize n;
htri_t vl_data_class;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Aread_short: read buffer is NULL");
if ((vl_data_class = h5str_detect_vlen(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (vl_data_class) {
/* Get size of data array */
if ((n = ENVPTR->GetArrayLength(ENVONLY, buf)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Aread: readBuf length < 0");
}
dims[0] = (hsize_t)n;
if ((sid = H5Screate_simple(1, dims, NULL)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
}
if (isCriticalPinning) {
PIN_SHORT_ARRAY_CRITICAL(ENVONLY, buf, readBuf, &readBufIsCopy,
"H5Aread_short: read buffer not critically pinned");
}
else {
PIN_SHORT_ARRAY(ENVONLY, buf, readBuf, &readBufIsCopy, "H5Aread_short: read buffer not pinned");
}
if ((status = H5Aread((hid_t)attr_id, (hid_t)mem_type_id, readBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (readBuf) {
if ((status >= 0) && vl_data_class) {
H5Treclaim(attr_id, sid, H5P_DEFAULT, readBuf);
if (sid >= 0)
H5Sclose(sid);
}
if (isCriticalPinning) {
UNPIN_ARRAY_CRITICAL(ENVONLY, buf, readBuf, (status < 0) ? JNI_ABORT : 0);
}
else {
UNPIN_SHORT_ARRAY(ENVONLY, buf, readBuf, (status < 0) ? JNI_ABORT : 0);
}
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Aread_1short */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Awrite_short
* Signature: (JJ[SZ)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Awrite_1short(JNIEnv *env, jclass clss, jlong attr_id, jlong mem_type_id,
jshortArray buf, jboolean isCriticalPinning)
{
jboolean writeBufIsCopy;
jshort *writeBuf = NULL;
hsize_t dims[H5S_MAX_RANK];
hid_t sid = H5I_INVALID_HID;
jsize n;
htri_t vl_data_class;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Awrite_short: write buffer is NULL");
/* Get size of data array */
if ((n = ENVPTR->GetArrayLength(ENVONLY, buf)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Aread: readBuf length < 0");
}
dims[0] = (hsize_t)n;
if ((sid = H5Screate_simple(1, dims, NULL)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if ((vl_data_class = h5str_detect_vlen(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (isCriticalPinning) {
PIN_SHORT_ARRAY_CRITICAL(ENVONLY, buf, writeBuf, &writeBufIsCopy,
"H5Awrite_short: write buffer not critically pinned");
}
else {
PIN_SHORT_ARRAY(ENVONLY, buf, writeBuf, &writeBufIsCopy, "H5Awrite_short: write buffer not pinned");
}
if ((status = H5Awrite((hid_t)attr_id, (hid_t)mem_type_id, writeBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (writeBuf) {
if ((status >= 0) && vl_data_class)
H5Treclaim(attr_id, sid, H5P_DEFAULT, writeBuf);
if (isCriticalPinning) {
UNPIN_ARRAY_CRITICAL(ENVONLY, buf, writeBuf, (status < 0) ? JNI_ABORT : 0);
}
else {
UNPIN_SHORT_ARRAY(ENVONLY, buf, writeBuf, (status < 0) ? JNI_ABORT : 0);
}
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Awrite_1short */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aread_int
* Signature: (JJ[IZ)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Aread_1int(JNIEnv *env, jclass clss, jlong attr_id, jlong mem_type_id, jintArray buf,
jboolean isCriticalPinning)
{
jboolean readBufIsCopy;
jint *readBuf = NULL;
hsize_t dims[H5S_MAX_RANK];
hid_t sid = H5I_INVALID_HID;
jsize n;
htri_t vl_data_class;
herr_t status = FAIL;
UNUSED(clss);
if (buf == NULL)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Aread_int: read buffer is NULL");
if ((vl_data_class = h5str_detect_vlen(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (vl_data_class) {
/* Get size of data array */
if ((n = ENVPTR->GetArrayLength(ENVONLY, buf)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Aread: readBuf length < 0");
}
dims[0] = (hsize_t)n;
if ((sid = H5Screate_simple(1, dims, NULL)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
}
if (isCriticalPinning) {
PIN_INT_ARRAY_CRITICAL(ENVONLY, buf, readBuf, &readBufIsCopy,
"H5Aread_int: read buffer not critically pinned");
}
else {
PIN_INT_ARRAY(ENVONLY, buf, readBuf, &readBufIsCopy, "H5Aread_int: read buffer not pinned");
}
if ((status = H5Aread((hid_t)attr_id, (hid_t)mem_type_id, readBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (readBuf) {
if ((status >= 0) && vl_data_class) {
H5Treclaim(attr_id, sid, H5P_DEFAULT, readBuf);
if (sid >= 0)
H5Sclose(sid);
}
if (isCriticalPinning) {
UNPIN_ARRAY_CRITICAL(ENVONLY, buf, readBuf, (status < 0) ? JNI_ABORT : 0);
}
else {
UNPIN_INT_ARRAY(ENVONLY, buf, readBuf, (status < 0) ? JNI_ABORT : 0);
}
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Aread_1int */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Awrite_int
* Signature: (JJ[IZ)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Awrite_1int(JNIEnv *env, jclass clss, jlong attr_id, jlong mem_type_id, jintArray buf,
jboolean isCriticalPinning)
{
jboolean writeBufIsCopy;
jint *writeBuf = NULL;
hsize_t dims[H5S_MAX_RANK];
hid_t sid = H5I_INVALID_HID;
jsize n;
htri_t vl_data_class;
herr_t status = FAIL;
UNUSED(clss);
if (buf == NULL)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Awrite_int: write buffer is NULL");
/* Get size of data array */
if ((n = ENVPTR->GetArrayLength(ENVONLY, buf)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Aread: readBuf length < 0");
}
dims[0] = (hsize_t)n;
if ((sid = H5Screate_simple(1, dims, NULL)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if ((vl_data_class = h5str_detect_vlen(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (isCriticalPinning) {
PIN_INT_ARRAY_CRITICAL(ENVONLY, buf, writeBuf, &writeBufIsCopy,
"H5Awrite_int: write buffer not critically pinned");
}
else {
PIN_INT_ARRAY(ENVONLY, buf, writeBuf, &writeBufIsCopy, "H5Awrite_int: write buffer not pinned");
}
if ((status = H5Awrite((hid_t)attr_id, (hid_t)mem_type_id, writeBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (writeBuf) {
if ((status >= 0) && vl_data_class)
H5Treclaim(attr_id, sid, H5P_DEFAULT, writeBuf);
if (isCriticalPinning) {
UNPIN_ARRAY_CRITICAL(ENVONLY, buf, writeBuf, (status < 0) ? JNI_ABORT : 0);
}
else {
UNPIN_INT_ARRAY(ENVONLY, buf, writeBuf, (status < 0) ? JNI_ABORT : 0);
}
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Awrite_1int */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aread_long
* Signature: (JJ[JZ)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Aread_1long(JNIEnv *env, jclass clss, jlong attr_id, jlong mem_type_id, jlongArray buf,
jboolean isCriticalPinning)
{
jboolean readBufIsCopy;
jlong *readBuf = NULL;
hsize_t dims[H5S_MAX_RANK];
hid_t sid = H5I_INVALID_HID;
jsize n;
htri_t vl_data_class;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Aread_long: read buffer is NULL");
if ((vl_data_class = h5str_detect_vlen(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (vl_data_class) {
/* Get size of data array */
if ((n = ENVPTR->GetArrayLength(ENVONLY, buf)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Aread: readBuf length < 0");
}
dims[0] = (hsize_t)n;
if ((sid = H5Screate_simple(1, dims, NULL)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
}
if (isCriticalPinning) {
PIN_LONG_ARRAY_CRITICAL(ENVONLY, buf, readBuf, &readBufIsCopy,
"H5Aread_long: read buffer not critically pinned");
}
else {
PIN_LONG_ARRAY(ENVONLY, buf, readBuf, &readBufIsCopy, "H5Aread_long: read buffer not pinned");
}
if ((status = H5Aread((hid_t)attr_id, (hid_t)mem_type_id, readBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (readBuf) {
if ((status >= 0) && vl_data_class) {
H5Treclaim(attr_id, sid, H5P_DEFAULT, readBuf);
if (sid >= 0)
H5Sclose(sid);
}
if (isCriticalPinning) {
UNPIN_ARRAY_CRITICAL(ENVONLY, buf, readBuf, (status < 0) ? JNI_ABORT : 0);
}
else {
UNPIN_LONG_ARRAY(ENVONLY, buf, readBuf, (status < 0) ? JNI_ABORT : 0);
}
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Aread_1long */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Awrite_long
* Signature: (JJ[JZ)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Awrite_1long(JNIEnv *env, jclass clss, jlong attr_id, jlong mem_type_id, jlongArray buf,
jboolean isCriticalPinning)
{
jboolean writeBufIsCopy;
jlong *writeBuf = NULL;
hsize_t dims[H5S_MAX_RANK];
hid_t sid = H5I_INVALID_HID;
jsize n;
htri_t vl_data_class;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Awrite_long: write buffer is NULL");
/* Get size of data array */
if ((n = ENVPTR->GetArrayLength(ENVONLY, buf)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Aread: readBuf length < 0");
}
dims[0] = (hsize_t)n;
if ((sid = H5Screate_simple(1, dims, NULL)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if ((vl_data_class = h5str_detect_vlen(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (isCriticalPinning) {
PIN_LONG_ARRAY_CRITICAL(ENVONLY, buf, writeBuf, &writeBufIsCopy,
"H5Awrite_long: write buffer not critically pinned");
}
else {
PIN_LONG_ARRAY(ENVONLY, buf, writeBuf, &writeBufIsCopy, "H5Awrite_long: write buffer not pinned");
}
if ((status = H5Awrite((hid_t)attr_id, (hid_t)mem_type_id, writeBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (writeBuf) {
if ((status >= 0) && vl_data_class)
H5Treclaim(attr_id, sid, H5P_DEFAULT, writeBuf);
if (isCriticalPinning) {
UNPIN_ARRAY_CRITICAL(ENVONLY, buf, writeBuf, (status < 0) ? JNI_ABORT : 0);
}
else {
UNPIN_LONG_ARRAY(ENVONLY, buf, writeBuf, (status < 0) ? JNI_ABORT : 0);
}
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Awrite_1long */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aread_float
* Signature: (JJ[FZ)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Aread_1float(JNIEnv *env, jclass clss, jlong attr_id, jlong mem_type_id,
jfloatArray buf, jboolean isCriticalPinning)
{
jboolean readBufIsCopy;
jfloat *readBuf = NULL;
hsize_t dims[H5S_MAX_RANK];
hid_t sid = H5I_INVALID_HID;
jsize n;
htri_t vl_data_class;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Aread_float: read buffer is NULL");
if ((vl_data_class = h5str_detect_vlen(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (vl_data_class) {
/* Get size of data array */
if ((n = ENVPTR->GetArrayLength(ENVONLY, buf)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Aread: readBuf length < 0");
}
dims[0] = (hsize_t)n;
if ((sid = H5Screate_simple(1, dims, NULL)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
}
if (isCriticalPinning) {
PIN_FLOAT_ARRAY_CRITICAL(ENVONLY, buf, readBuf, &readBufIsCopy,
"H5Aread_float: read buffer not critically pinned");
}
else {
PIN_FLOAT_ARRAY(ENVONLY, buf, readBuf, &readBufIsCopy, "H5Aread_float: read buffer not pinned");
}
if ((status = H5Aread((hid_t)attr_id, (hid_t)mem_type_id, readBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (readBuf) {
if ((status >= 0) && vl_data_class) {
H5Treclaim(attr_id, sid, H5P_DEFAULT, readBuf);
if (sid >= 0)
H5Sclose(sid);
}
if (isCriticalPinning) {
UNPIN_ARRAY_CRITICAL(ENVONLY, buf, readBuf, (status < 0) ? JNI_ABORT : 0);
}
else {
UNPIN_FLOAT_ARRAY(ENVONLY, buf, readBuf, (status < 0) ? JNI_ABORT : 0);
}
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Aread_1float */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Awrite_float
* Signature: (JJ[FZ)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Awrite_1float(JNIEnv *env, jclass clss, jlong attr_id, jlong mem_type_id,
jfloatArray buf, jboolean isCriticalPinning)
{
jboolean writeBufIsCopy;
jfloat *writeBuf = NULL;
hsize_t dims[H5S_MAX_RANK];
hid_t sid = H5I_INVALID_HID;
jsize n;
htri_t vl_data_class;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Awrite_float: write buffer is NULL");
/* Get size of data array */
if ((n = ENVPTR->GetArrayLength(ENVONLY, buf)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Aread: readBuf length < 0");
}
dims[0] = (hsize_t)n;
if ((sid = H5Screate_simple(1, dims, NULL)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if ((vl_data_class = h5str_detect_vlen(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (isCriticalPinning) {
PIN_FLOAT_ARRAY_CRITICAL(ENVONLY, buf, writeBuf, &writeBufIsCopy,
"H5Awrite_float: write buffer not critically pinned");
}
else {
PIN_FLOAT_ARRAY(ENVONLY, buf, writeBuf, &writeBufIsCopy, "H5Awrite_float: write buffer not pinned");
}
if ((status = H5Awrite((hid_t)attr_id, (hid_t)mem_type_id, writeBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (writeBuf) {
if ((status >= 0) && vl_data_class)
H5Treclaim(attr_id, sid, H5P_DEFAULT, writeBuf);
if (isCriticalPinning) {
UNPIN_ARRAY_CRITICAL(ENVONLY, buf, writeBuf, (status < 0) ? JNI_ABORT : 0);
}
else {
UNPIN_FLOAT_ARRAY(ENVONLY, buf, writeBuf, (status < 0) ? JNI_ABORT : 0);
}
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Awrite_1float */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aread_double
* Signature: (JJ[DZ)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Aread_1double(JNIEnv *env, jclass clss, jlong attr_id, jlong mem_type_id,
jdoubleArray buf, jboolean isCriticalPinning)
{
jboolean readBufIsCopy;
jdouble *readBuf = NULL;
hsize_t dims[H5S_MAX_RANK];
hid_t sid = H5I_INVALID_HID;
jsize n;
htri_t vl_data_class;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Aread_double: read buffer is NULL");
if ((vl_data_class = h5str_detect_vlen(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (vl_data_class) {
/* Get size of data array */
if ((n = ENVPTR->GetArrayLength(ENVONLY, buf)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Aread: readBuf length < 0");
}
dims[0] = (hsize_t)n;
if ((sid = H5Screate_simple(1, dims, NULL)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
}
if (isCriticalPinning) {
PIN_DOUBLE_ARRAY_CRITICAL(ENVONLY, buf, readBuf, &readBufIsCopy,
"H5Aread_double: read buffer not critically pinned");
}
else {
PIN_DOUBLE_ARRAY(ENVONLY, buf, readBuf, &readBufIsCopy, "H5Aread_double: read buffer not pinned");
}
if ((status = H5Aread((hid_t)attr_id, (hid_t)mem_type_id, readBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (readBuf) {
if ((status >= 0) && vl_data_class) {
H5Treclaim(attr_id, sid, H5P_DEFAULT, readBuf);
if (sid >= 0)
H5Sclose(sid);
}
if (isCriticalPinning) {
UNPIN_ARRAY_CRITICAL(ENVONLY, buf, readBuf, (status < 0) ? JNI_ABORT : 0);
}
else {
UNPIN_DOUBLE_ARRAY(ENVONLY, buf, readBuf, (status < 0) ? JNI_ABORT : 0);
}
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Aread_1double */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Awrite_double
* Signature: (JJ[DZ)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Awrite_1double(JNIEnv *env, jclass clss, jlong attr_id, jlong mem_type_id,
jdoubleArray buf, jboolean isCriticalPinning)
{
jboolean writeBufIsCopy;
jdouble *writeBuf = NULL;
hsize_t dims[H5S_MAX_RANK];
hid_t sid = H5I_INVALID_HID;
jsize n;
htri_t vl_data_class;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Awrite_double: write buffer is NULL");
if ((n = ENVPTR->GetArrayLength(ENVONLY, buf)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Awrite_double: buf length < 0");
}
dims[0] = (hsize_t)n;
if ((sid = H5Screate_simple(1, dims, NULL)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if ((vl_data_class = h5str_detect_vlen(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (isCriticalPinning) {
PIN_DOUBLE_ARRAY_CRITICAL(ENVONLY, buf, writeBuf, &writeBufIsCopy,
"H5Awrite_double: write buffer not critically pinned");
}
else {
PIN_DOUBLE_ARRAY(ENVONLY, buf, writeBuf, &writeBufIsCopy, "H5Awrite_double: write buffer not pinned");
}
if ((status = H5Awrite((hid_t)attr_id, (hid_t)mem_type_id, writeBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (writeBuf) {
if ((status >= 0) && vl_data_class)
H5Treclaim(attr_id, sid, H5P_DEFAULT, writeBuf);
if (isCriticalPinning) {
UNPIN_ARRAY_CRITICAL(ENVONLY, buf, writeBuf, (status < 0) ? JNI_ABORT : 0);
}
else {
UNPIN_DOUBLE_ARRAY(ENVONLY, buf, writeBuf, (status < 0) ? JNI_ABORT : 0);
}
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Awrite_1double */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aread_string
* Signature: (JJ[Ljava/lang/String;)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Aread_1string(JNIEnv *env, jclass clss, jlong attr_id, jlong mem_type_id,
jobjectArray j_buf)
{
jstring jstr;
size_t str_len;
size_t pos;
jsize i, n;
char *c_buf = NULL;
char *cstr = NULL;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == j_buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Aread_string: read buffer is NULL");
if ((n = ENVPTR->GetArrayLength(ENVONLY, j_buf)) <= 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Aread_string: read buffer length <= 0");
}
if (!(str_len = H5Tget_size((hid_t)mem_type_id)))
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (cstr = (char *)malloc(str_len + 1)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Aread_string: memory allocation failed");
if (NULL == (c_buf = (char *)malloc((size_t)n * str_len)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Aread_string: memory allocation failed");
if ((status = H5Aread((hid_t)attr_id, (hid_t)mem_type_id, c_buf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
for (i = 0, pos = 0; i < n; i++) {
memcpy(cstr, c_buf + pos, str_len);
cstr[str_len] = '\0';
if (NULL == (jstr = ENVPTR->NewStringUTF(ENVONLY, cstr))) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_OUT_OF_MEMORY_ERROR(
ENVONLY, "H5Aread_string: out of memory - unable to construct string from UTF characters");
}
ENVPTR->SetObjectArrayElement(ENVONLY, j_buf, i, jstr);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
pos += str_len;
ENVPTR->DeleteLocalRef(ENVONLY, jstr);
} /* end for */
done:
if (c_buf)
free(c_buf);
if (cstr)
free(cstr);
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Aread_1string */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Awrite_string
* Signature: (JJ[Ljava/lang/String;)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Awrite_1string(JNIEnv *env, jclass clss, jlong attr_id, jlong mem_type_id,
jobjectArray j_buf)
{
const char *utf8 = NULL;
jstring obj;
size_t i, str_len;
jsize n;
char *c_buf = NULL;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == j_buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Awrite_string: write buffer is NULL");
if ((n = ENVPTR->GetArrayLength(ENVONLY, j_buf)) <= 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Awrite_string: write buffer length <= 0");
}
if (!(str_len = H5Tget_size((hid_t)mem_type_id)))
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (c_buf = (char *)malloc((size_t)n * str_len)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Awrite_string: memory allocation failed");
for (i = 0; i < (size_t)n; i++) {
if (NULL == (obj = (jstring)ENVPTR->GetObjectArrayElement(ENVONLY, (jobjectArray)j_buf, (jsize)i))) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
/*
* If the string object was NULL, skip it.
*/
memset(&c_buf[i * str_len], 0, str_len);
continue;
}
/*
* length = ENVPTR->GetStringUTFLength(ENVONLY, obj);
* CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
*/
PIN_JAVA_STRING(ENVONLY, obj, utf8, NULL, "H5Awrite_string: string not pinned");
strncpy(&c_buf[i * str_len], utf8, str_len);
UNPIN_JAVA_STRING(ENVONLY, obj, utf8);
utf8 = NULL;
ENVPTR->DeleteLocalRef(ENVONLY, obj);
} /* end for */
if ((status = H5Awrite((hid_t)attr_id, (hid_t)mem_type_id, c_buf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (utf8)
UNPIN_JAVA_STRING(ENVONLY, obj, utf8);
if (c_buf)
free(c_buf);
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Awrite_1string */
/*
* Class: hdf_hdf5lib_H5
* Method: H5AreadVL
* Signature: (JJ[java/util/ArrayList;)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5AreadVL(JNIEnv *env, jclass clss, jlong attr_id, jlong mem_type_id, jobjectArray buf)
{
void *readBuf = NULL;
hsize_t dims[H5S_MAX_RANK];
hid_t sid = H5I_INVALID_HID;
size_t typeSize;
H5T_class_t type_class;
jsize vl_array_len = 0;
htri_t vl_data_class;
herr_t status = FAIL;
htri_t is_variable = 0;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Aread: read buffer is NULL");
if ((vl_data_class = h5str_detect_vlen(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
/* Get size of data array */
if ((vl_array_len = ENVPTR->GetArrayLength(ENVONLY, buf)) < 0)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Aread: readBuf length < 0");
if ((is_variable = H5Tis_variable_str(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (!(typeSize = H5Tget_size(mem_type_id)))
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (readBuf = calloc((size_t)vl_array_len, typeSize)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Aread: failed to allocate raw VL read buffer");
if ((status = H5Aread((hid_t)attr_id, (hid_t)mem_type_id, readBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if ((type_class = H5Tget_class((hid_t)mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
translate_rbuf(env, buf, mem_type_id, type_class, vl_array_len, readBuf);
done:
if (readBuf) {
if ((status >= 0) && vl_data_class) {
dims[0] = (hsize_t)vl_array_len;
if ((sid = H5Screate_simple(1, dims, NULL)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
H5Treclaim(attr_id, sid, H5P_DEFAULT, readBuf);
if (sid >= 0)
H5Sclose(sid);
}
if (is_variable) {
for (size_t i = 0; i < (size_t)vl_array_len; i++)
free(((char **)readBuf)[i]);
}
free(readBuf);
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5AreadVL */
/*
* Class: hdf_hdf5lib_H5
* Method: H5AwriteVL
* Signature: (JJ[java/util/ArrayList;)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5AwriteVL(JNIEnv *env, jclass clss, jlong attr_id, jlong mem_type_id, jobjectArray buf)
{
void *writeBuf = NULL;
hsize_t dims[H5S_MAX_RANK];
hid_t sid = H5I_INVALID_HID;
size_t typeSize;
H5T_class_t type_class;
jsize vl_array_len = 0;
htri_t vl_data_class;
herr_t status = FAIL;
htri_t is_variable = 0;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Awrite: write buffer is NULL");
if ((vl_data_class = h5str_detect_vlen(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
/* Get size of data array */
if ((vl_array_len = ENVPTR->GetArrayLength(ENVONLY, buf)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Awrite: write buffer length < 0");
}
if ((is_variable = H5Tis_variable_str(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (!(typeSize = H5Tget_size(mem_type_id)))
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (writeBuf = calloc((size_t)vl_array_len, typeSize)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Awrite: failed to allocate raw VL write buffer");
if ((type_class = H5Tget_class((hid_t)mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
translate_wbuf(ENVONLY, buf, mem_type_id, type_class, vl_array_len, writeBuf);
if ((status = H5Awrite((hid_t)attr_id, (hid_t)mem_type_id, writeBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (writeBuf) {
if ((status >= 0) && vl_data_class) {
dims[0] = (hsize_t)vl_array_len;
if ((sid = H5Screate_simple(1, dims, NULL)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
H5Treclaim(attr_id, sid, H5P_DEFAULT, writeBuf);
}
if (is_variable) {
for (size_t i = 0; i < (size_t)vl_array_len; i++)
free(((char **)writeBuf)[i]);
}
free(writeBuf);
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5AwriteVL */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aread_VLStrings
* Signature: (JJ[Ljava/lang/String;)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Aread_1VLStrings(JNIEnv *env, jclass clss, jlong attr_id, jlong mem_type_id,
jobjectArray buf)
{
H5T_class_t type_class;
htri_t isStr = 0;
htri_t isVlenStr = 0;
htri_t isCompound = 0;
htri_t isVlen = 0;
hid_t nested_tid = H5I_INVALID_HID;
bool isComposite = false;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Aread_VLStrings: read buffer is NULL");
if ((isStr = H5Tdetect_class((hid_t)mem_type_id, H5T_STRING)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if ((type_class = H5Tget_class((hid_t)mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (type_class == H5T_COMPOUND) {
unsigned i;
int num_members;
if ((num_members = H5Tget_nmembers(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
for (i = 0; i < (unsigned)num_members; i++) {
if ((nested_tid = H5Tget_member_type((hid_t)mem_type_id, i)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if ((isCompound = H5Tdetect_class((hid_t)nested_tid, H5T_COMPOUND)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if ((isVlen = H5Tdetect_class((hid_t)nested_tid, H5T_VLEN)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
isComposite = isCompound || isVlen;
if (H5Tclose(nested_tid) < 0)
H5_LIBRARY_ERROR(ENVONLY);
nested_tid = H5I_INVALID_HID;
}
}
else if (type_class == H5T_VLEN) {
isVlenStr = 1; /* Strings created by H5Tvlen_create(H5T_C_S1) */
}
if (!isStr || isComposite || isVlenStr) {
if ((status = H5AreadVL_asstr(env, (hid_t)attr_id, (hid_t)mem_type_id, buf)) < 0)
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
}
else if (isStr) {
if ((status = H5AreadVL_str(env, (hid_t)attr_id, (hid_t)mem_type_id, buf)) < 0)
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
}
done:
if (nested_tid >= 0)
H5Tclose(nested_tid);
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Aread_1VLStrings */
/*
* Helper method to read in a buffer of variable-length strings from an HDF5
* attribute. Each C-string is converted to a Java string and set in the output
* buffer in turn.
*/
static herr_t
H5AreadVL_str(JNIEnv *env, hid_t aid, hid_t tid, jobjectArray buf)
{
jstring jstr;
jsize i, n;
char **strs = NULL;
herr_t status = FAIL;
if ((n = ENVPTR->GetArrayLength(ENVONLY, buf)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5AreadVL_str: buf length < 0");
}
if (NULL == (strs = (char **)calloc((size_t)n, sizeof(char *))))
H5_OUT_OF_MEMORY_ERROR(ENVONLY,
"H5AreadVL_str: failed to allocate variable length string read buffer");
if ((status = H5Aread(aid, tid, strs)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
/*
* When repeatedly reading a dataset with a large number of strs (e.g., 1,000,000 strings),
* H5Treclaim() may crash on Windows because the Java GC will not be able to collect
* free space in time. Instead, we use "H5free_memory(strs[i])" to free individual strings
* once done.
*/
for (i = 0; i < n; i++) {
if (NULL == (jstr = ENVPTR->NewStringUTF(ENVONLY, strs[i])))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
ENVPTR->SetObjectArrayElement(ENVONLY, buf, i, jstr);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
H5free_memory(strs[i]);
strs[i] = NULL;
ENVPTR->DeleteLocalRef(ENVONLY, jstr);
} /* end for */
done:
if (strs) {
for (i = 0; i < n; i++) {
if (strs[i])
H5free_memory(strs[i]);
}
free(strs);
}
return status;
} /* end H5AreadVL_str */
/*
* Helper method to read in a buffer of variable-length (hvl_t)
* structures from an HDF5 attribute and convert each variable-length
* element's buffer into a Java string. Each string is then set
* in the output buffer in turn.
*/
static herr_t
H5AreadVL_asstr(JNIEnv *env, hid_t aid, hid_t tid, jobjectArray buf)
{
hsize_t dims[H5S_MAX_RANK];
jstring jstr;
h5str_t h5str;
size_t typeSize;
size_t i;
hid_t sid = H5I_INVALID_HID;
jsize n;
void *readBuf = NULL;
herr_t status = FAIL;
memset(&h5str, 0, sizeof(h5str_t));
/* Get size of string array */
if ((n = ENVPTR->GetArrayLength(ENVONLY, buf)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5AreadVL_asstr: buf length < 0");
}
dims[0] = (hsize_t)n;
if ((sid = H5Screate_simple(1, dims, NULL)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (!(typeSize = H5Tget_size(tid)))
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (readBuf = calloc((size_t)n, typeSize)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5AreadVL_asstr: failed to allocate read buffer");
if ((status = H5Aread(aid, tid, readBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
/* Allocate a decent-sized initial string */
h5str_new(&h5str, 4 * typeSize);
if (!h5str.s)
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5AreadVL_asstr: failed to allocate buffer");
/* Convert each element to a char string */
for (i = 0; i < (size_t)n; i++) {
h5str.s[0] = '\0';
if (!h5str_sprintf(ENVONLY, &h5str, aid, tid, &(((char *)readBuf)[i * typeSize]), 0))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
if (NULL == (jstr = ENVPTR->NewStringUTF(ENVONLY, h5str.s)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
ENVPTR->SetObjectArrayElement(ENVONLY, buf, (jsize)i, jstr);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
ENVPTR->DeleteLocalRef(ENVONLY, jstr);
} /* end for */
done:
if (h5str.s)
h5str_free(&h5str);
if (readBuf) {
H5Treclaim(tid, sid, H5P_DEFAULT, readBuf);
free(readBuf);
}
if (sid >= 0)
H5Sclose(sid);
return status;
}
/*
* Class: hdf_hdf5lib_H5
* Method: H5Awrite_VLStrings
* Signature: (JJ[Ljava/lang/String;)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Awrite_1VLStrings(JNIEnv *env, jclass clss, jlong attr_id, jlong mem_type_id,
jobjectArray buf)
{
H5T_class_t type_class;
htri_t isStr = 0;
htri_t isVlenStr = 0;
htri_t isCompound = 0;
htri_t isVlen = 0;
hid_t nested_tid = H5I_INVALID_HID;
bool isComposite = false;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Awrite_VLStrings: write buffer is NULL");
if ((isStr = H5Tdetect_class((hid_t)mem_type_id, H5T_STRING)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if ((type_class = H5Tget_class((hid_t)mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (type_class == H5T_COMPOUND) {
unsigned i;
int num_members;
if ((num_members = H5Tget_nmembers(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
for (i = 0; i < (unsigned)num_members; i++) {
if ((nested_tid = H5Tget_member_type((hid_t)mem_type_id, i)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if ((isCompound = H5Tdetect_class((hid_t)nested_tid, H5T_COMPOUND)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if ((isVlen = H5Tdetect_class((hid_t)nested_tid, H5T_VLEN)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
isComposite = isCompound || isVlen;
if (H5Tclose(nested_tid) < 0)
H5_LIBRARY_ERROR(ENVONLY);
nested_tid = H5I_INVALID_HID;
}
}
else if (type_class == H5T_VLEN) {
isVlenStr = 1; /* Strings created by H5Tvlen_create(H5T_C_S1) */
}
if (!isStr || isComposite || isVlenStr) {
if ((status = H5AwriteVL_asstr(env, (hid_t)attr_id, (hid_t)mem_type_id, buf)) < 0)
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
}
else if (isStr) {
if ((status = H5AwriteVL_str(env, (hid_t)attr_id, (hid_t)mem_type_id, buf)) < 0)
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
}
done:
if (nested_tid >= 0)
H5Tclose(nested_tid);
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Awrite_1VLStrings */
/*
* Helper method to convert an array of Java strings into a buffer of C-strings.
* The buffer of C-strings is then written to the HDF5 attribute specified.
*/
static herr_t
H5AwriteVL_str(JNIEnv *env, hid_t aid, hid_t tid, jobjectArray buf)
{
const char *utf8 = NULL;
jstring obj;
jsize size;
jint i;
char **writeBuf = NULL;
herr_t status = FAIL;
if ((size = ENVPTR->GetArrayLength(ENVONLY, (jarray)buf)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5AwriteVL_str: buf length < 0");
}
if (NULL == (writeBuf = (char **)calloc((size_t)size + 1, sizeof(char *))))
H5_OUT_OF_MEMORY_ERROR(ENVONLY,
"H5AwriteVL_str: failed to allocate variable length string write buffer");
for (i = 0; i < size; ++i) {
jsize length;
if (NULL == (obj = (jstring)ENVPTR->GetObjectArrayElement(ENVONLY, (jobjectArray)buf, i))) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
/*
* If the string object was NULL, skip it.
*/
writeBuf[i] = NULL;
continue;
}
length = ENVPTR->GetStringUTFLength(ENVONLY, obj);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
PIN_JAVA_STRING(ENVONLY, obj, utf8, NULL, "H5AwriteVL_str: string not pinned");
if (NULL == (writeBuf[i] = (char *)malloc((size_t)length + 1)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5AwriteVL_str: failed to allocate string buffer");
strncpy(writeBuf[i], utf8, (size_t)length + 1);
writeBuf[i][length] = '\0';
UNPIN_JAVA_STRING(ENVONLY, obj, utf8);
utf8 = NULL;
ENVPTR->DeleteLocalRef(ENVONLY, obj);
} /* end for (i = 0; i < size; ++i) */
if ((status = H5Awrite((hid_t)aid, (hid_t)tid, writeBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (utf8)
UNPIN_JAVA_STRING(ENVONLY, obj, utf8);
if (writeBuf) {
for (i = 0; i < size; i++) {
if (writeBuf[i])
free(writeBuf[i]);
}
free(writeBuf);
}
return status;
} /* end H5AwriteVL_str */
/*
* Helper method to convert an array of Java strings into a buffer of
* variable-length (hvl_t) elements. The buffer of variable-length
* elements is then written to the HDF5 attribute.
*/
static herr_t
H5AwriteVL_asstr(JNIEnv *env, hid_t aid, hid_t tid, jobjectArray buf)
{
const char *utf8 = NULL;
hsize_t dims[H5S_MAX_RANK];
jstring jstr = NULL;
size_t typeSize;
size_t i;
hid_t sid = H5I_INVALID_HID;
jsize n;
void *writeBuf = NULL;
herr_t status = FAIL;
if ((n = ENVPTR->GetArrayLength(ENVONLY, buf)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5AwriteVL_asstr: buf length < 0");
}
dims[0] = (hsize_t)n;
if ((sid = H5Screate_simple(1, dims, NULL)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (!(typeSize = H5Tget_size(tid)))
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (writeBuf = calloc((size_t)n, typeSize)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5AwriteVL_asstr: failed to allocate write buffer");
/*
* When repeatedly writing a dataset with a large number of strs (e.g., 1,000,000 strings),
* H5Treclaim() may crash on Windows because the Java GC will not be able to collect
* free space in time. Instead, we use "H5free_memory(strs[i])" to free individual strings
* once done.
*/
for (i = 0; i < (size_t)n; i++) {
if (NULL == (jstr = (jstring)ENVPTR->GetObjectArrayElement(ENVONLY, (jobjectArray)buf, (jsize)i))) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
/*
* If the string object was NULL, skip it.
*/
memset(&(((char *)writeBuf)[i * typeSize]), 0, typeSize);
continue;
}
PIN_JAVA_STRING(ENVONLY, jstr, utf8, NULL, "H5AwriteVL_asstr: failed to pin string buffer");
/*
* Make a copy of the string since h5str_convert uses strtok.
*/
char *utf8_copy = NULL;
jsize length = ENVPTR->GetStringUTFLength(ENVONLY, jstr);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
if (NULL == (utf8_copy = HDstrndup(utf8, (size_t)length)))
H5_LIBRARY_ERROR(ENVONLY);
if (!h5str_convert(ENVONLY, &utf8_copy, aid, tid, &(((char *)writeBuf)[i * typeSize]), 0))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
free(utf8_copy);
UNPIN_JAVA_STRING(ENVONLY, jstr, utf8);
utf8 = NULL;
ENVPTR->DeleteLocalRef(ENVONLY, jstr);
} /* end for (i = 0; i < n; i++) */
if ((status = H5Awrite(aid, tid, writeBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (utf8)
UNPIN_JAVA_STRING(ENVONLY, jstr, utf8);
if (writeBuf) {
H5Treclaim(tid, sid, H5P_DEFAULT, writeBuf);
free(writeBuf);
}
if (sid >= 0)
H5Sclose(sid);
return status;
} /* end H5AwriteVL_asstr */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aread_reg_ref
* Signature: (JJ[Ljava/lang/String;)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Aread_1reg_1ref(JNIEnv *env, jclass clss, jlong attr_id, jlong mem_type_id,
jobjectArray buf)
{
H5R_ref_t *ref_data = NULL;
h5str_t h5str;
jstring jstr;
jsize i, n;
herr_t status = FAIL;
UNUSED(clss);
memset(&h5str, 0, sizeof(h5str_t));
if ((n = ENVPTR->GetArrayLength(ENVONLY, buf)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Aread_reg_ref: buf length < 0");
}
if (NULL == (ref_data = (H5R_ref_t *)calloc(1, (size_t)n * sizeof(H5R_ref_t))))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Aread_reg_ref: failed to allocate read buffer");
if ((status = H5Aread((hid_t)attr_id, (hid_t)mem_type_id, ref_data)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
h5str_new(&h5str, 1024);
if (!h5str.s)
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Aread_reg_ref: failed to allocate buffer");
for (i = 0; i < n; i++) {
h5str.s[0] = '\0';
if (!h5str_sprintf(ENVONLY, &h5str, (hid_t)attr_id, (hid_t)mem_type_id, (void *)&ref_data[i], 0))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
if (NULL == (jstr = ENVPTR->NewStringUTF(ENVONLY, h5str.s)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
ENVPTR->SetObjectArrayElement(ENVONLY, buf, i, jstr);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
ENVPTR->DeleteLocalRef(ENVONLY, jstr);
} /* end for */
done:
if (h5str.s)
h5str_free(&h5str);
if (ref_data)
free(ref_data);
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Aread_1reg_1ref */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aget_space
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Aget_1space(JNIEnv *env, jclass clss, jlong attr_id)
{
hid_t retVal = H5I_INVALID_HID;
UNUSED(clss);
if ((retVal = H5Aget_space((hid_t)attr_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jlong)retVal;
} /* end Java_hdf_hdf5lib_H5__1H5Aget_1space */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aget_type
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Aget_1type(JNIEnv *env, jclass clss, jlong attr_id)
{
hid_t retVal = H5I_INVALID_HID;
UNUSED(clss);
if ((retVal = H5Aget_type((hid_t)attr_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jlong)retVal;
} /* end Java_hdf_hdf5lib_H5__1H5Aget_1type */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aget_name
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
Java_hdf_hdf5lib_H5_H5Aget_1name(JNIEnv *env, jclass clss, jlong attr_id)
{
jstring str = NULL;
ssize_t buf_size;
char *attrName = NULL;
UNUSED(clss);
if ((buf_size = H5Aget_name((hid_t)attr_id, 0, NULL)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (attrName = (char *)malloc(sizeof(char) * (size_t)buf_size + 1)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Aget_name: failed to allocate attribute name buffer");
if (H5Aget_name((hid_t)attr_id, (size_t)buf_size + 1, attrName) < 0)
H5_LIBRARY_ERROR(ENVONLY);
attrName[buf_size] = '\0';
if (NULL == (str = ENVPTR->NewStringUTF(ENVONLY, attrName)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
done:
if (attrName)
free(attrName);
return str;
} /* end Java_hdf_hdf5lib_H5_H5Aget_1name */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aget_num_attrs
* Signature: (J)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Aget_1num_1attrs(JNIEnv *env, jclass clss, jlong loc_id)
{
int retVal = FAIL;
UNUSED(clss);
#ifdef H5_NO_DEPRECATED_SYMBOLS
UNUSED(loc_id);
H5_UNIMPLEMENTED(ENVONLY, "H5Aget_num_attrs: not implemented");
#else
if ((retVal = H5Aget_num_attrs((hid_t)loc_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
#endif
done:
return (jint)retVal;
} /* end Java_hdf_hdf5lib_H5_H5Aget_1num_1attrs */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Adelete
* Signature: (JLjava/lang/String;)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Adelete(JNIEnv *env, jclass clss, jlong loc_id, jstring name)
{
const char *attrName = NULL;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Adelete: attribute name is NULL");
PIN_JAVA_STRING(ENVONLY, name, attrName, NULL, "H5Adelete: attribute name not pinned");
if ((status = H5Adelete((hid_t)loc_id, attrName)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (attrName)
UNPIN_JAVA_STRING(ENVONLY, name, attrName);
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Adelete */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aclose
* Signature: (J)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5__1H5Aclose(JNIEnv *env, jclass clss, jlong attr_id)
{
herr_t retVal = FAIL;
UNUSED(clss);
if ((retVal = H5Aclose((hid_t)attr_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jint)retVal;
} /* end Java_hdf_hdf5lib_H5__1H5Aclose */
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Acreate2
* Signature: (JLjava/lang/String;JJJJ)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Acreate2(JNIEnv *env, jclass clss, jlong loc_id, jstring name, jlong type_id,
jlong space_id, jlong create_plist, jlong access_plist)
{
const char *attrName = NULL;
hid_t status = H5I_INVALID_HID;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Acreate2: attribute name is NULL");
PIN_JAVA_STRING(ENVONLY, name, attrName, NULL, "H5Acreate2: attribute name not pinned");
if ((status = H5Acreate2((hid_t)loc_id, attrName, (hid_t)type_id, (hid_t)space_id, (hid_t)create_plist,
(hid_t)access_plist)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (attrName)
UNPIN_JAVA_STRING(ENVONLY, name, attrName);
return (jlong)status;
} /* end Java_hdf_hdf5lib_H5__1H5Acreate2 */
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Aopen
* Signature: (JLjava/lang/String;J)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Aopen(JNIEnv *env, jclass clss, jlong obj_id, jstring name, jlong access_plist)
{
const char *attrName = NULL;
hid_t retVal = H5I_INVALID_HID;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Aopen: attribute name is NULL");
PIN_JAVA_STRING(ENVONLY, name, attrName, NULL, "H5Aopen: attribute name not pinned");
if ((retVal = H5Aopen((hid_t)obj_id, attrName, (hid_t)access_plist)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (attrName)
UNPIN_JAVA_STRING(ENVONLY, name, attrName);
return (jlong)retVal;
} /* end Java_hdf_hdf5lib_H5__1H5Aopen */
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Aopen_by_idx
* Signature: (JLjava/lang/String;IIJJJ)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Aopen_1by_1idx(JNIEnv *env, jclass clss, jlong loc_id, jstring name, jint idx_type,
jint order, jlong n, jlong aapl_id, jlong lapl_id)
{
const char *objName = NULL;
hid_t retVal = H5I_INVALID_HID;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Aopen_by_idx: object name is NULL");
PIN_JAVA_STRING(ENVONLY, name, objName, NULL, "H5Aopen_by_idx: object name not pinned");
if ((retVal = H5Aopen_by_idx((hid_t)loc_id, objName, (H5_index_t)idx_type, (H5_iter_order_t)order,
(hsize_t)n, (hid_t)aapl_id, (hid_t)lapl_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (objName)
UNPIN_JAVA_STRING(ENVONLY, name, objName);
return (jlong)retVal;
} /* end Java_hdf_hdf5lib_H5__1H5Aopen_1by_1idx */
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Acreate_by_name
* Signature: (JLjava/lang/String;Ljava/lang/String;JJJJJ)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Acreate_1by_1name(JNIEnv *env, jclass clss, jlong loc_id, jstring obj_name,
jstring attr_name, jlong type_id, jlong space_id, jlong acpl_id,
jlong aapl_id, jlong lapl_id)
{
const char *objName = NULL;
const char *attrName = NULL;
hid_t retVal = H5I_INVALID_HID;
UNUSED(clss);
if (NULL == obj_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Acreate_by_name: object name is NULL");
if (NULL == attr_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Acreate_by_name: attribute name is NULL");
PIN_JAVA_STRING(ENVONLY, obj_name, objName, NULL, "H5Acreate_by_name: object name not pinned");
PIN_JAVA_STRING(ENVONLY, attr_name, attrName, NULL, "H5Acreate_by_name: attribute name not pinned");
if ((retVal = H5Acreate_by_name((hid_t)loc_id, objName, attrName, (hid_t)type_id, (hid_t)space_id,
(hid_t)acpl_id, (hid_t)aapl_id, (hid_t)lapl_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (attrName)
UNPIN_JAVA_STRING(ENVONLY, attr_name, attrName);
if (objName)
UNPIN_JAVA_STRING(ENVONLY, obj_name, objName);
return (jlong)retVal;
} /* end Java_hdf_hdf5lib_H5__1H5Acreate_1by_1name */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aexists_by_name
* Signature: (JLjava/lang/String;Ljava/lang/String;J)Z
*/
JNIEXPORT jboolean JNICALL
Java_hdf_hdf5lib_H5_H5Aexists_1by_1name(JNIEnv *env, jclass clss, jlong loc_id, jstring obj_name,
jstring attr_name, jlong lapl_id)
{
const char *objName = NULL;
const char *attrName = NULL;
htri_t bval = JNI_FALSE;
UNUSED(clss);
if (NULL == obj_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Aexists_by_name: object name is NULL");
if (NULL == attr_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Aexists_by_name: attribute name is NULL");
PIN_JAVA_STRING(ENVONLY, obj_name, objName, NULL, "H5Aexists_by_name: object name not pinned");
PIN_JAVA_STRING(ENVONLY, attr_name, attrName, NULL, "H5Aexists_by_name: attribute name not pinned");
if ((bval = H5Aexists_by_name((hid_t)loc_id, objName, attrName, (hid_t)lapl_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
bval = (bval > 0) ? JNI_TRUE : JNI_FALSE;
done:
if (attrName)
UNPIN_JAVA_STRING(ENVONLY, attr_name, attrName);
if (objName)
UNPIN_JAVA_STRING(ENVONLY, obj_name, objName);
return (jboolean)bval;
} /* end Java_hdf_hdf5lib_H5_H5Aexists_1by_1name */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Arename
* Signature: (JLjava/lang/String;Ljava/lang/String)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Arename(JNIEnv *env, jclass clss, jlong loc_id, jstring old_attr_name,
jstring new_attr_name)
{
const char *oldAttrName = NULL;
const char *newAttrName = NULL;
herr_t retVal = FAIL;
UNUSED(clss);
if (NULL == old_attr_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Arename: old attribute name is NULL");
if (NULL == new_attr_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Arename: new attribute name is NULL");
PIN_JAVA_STRING(ENVONLY, old_attr_name, oldAttrName, NULL, "H5Arename: old attribute name not pinned");
PIN_JAVA_STRING(ENVONLY, new_attr_name, newAttrName, NULL, "H5Arename: new attribute name not pinned");
if ((retVal = H5Arename((hid_t)loc_id, oldAttrName, newAttrName)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (newAttrName)
UNPIN_JAVA_STRING(ENVONLY, new_attr_name, newAttrName);
if (oldAttrName)
UNPIN_JAVA_STRING(ENVONLY, old_attr_name, oldAttrName);
return (jint)retVal;
} /* end Java_hdf_hdf5lib_H5_H5Arename */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Arename_by_name
* Signature: (JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;J)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Arename_1by_1name(JNIEnv *env, jclass clss, jlong loc_id, jstring obj_name,
jstring old_attr_name, jstring new_attr_name, jlong lapl_id)
{
const char *objName = NULL;
const char *oldAttrName = NULL;
const char *newAttrName = NULL;
herr_t retVal = FAIL;
UNUSED(clss);
if (NULL == obj_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Arename_by_name: object name is NULL");
if (NULL == old_attr_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Arename_by_name: old attribute name is NULL");
if (NULL == new_attr_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Arename_by_name: new attribute name is NULL");
PIN_JAVA_STRING(ENVONLY, obj_name, objName, NULL, "H5Arename_by_name: object name not pinned");
PIN_JAVA_STRING(ENVONLY, old_attr_name, oldAttrName, NULL,
"H5Arename_by_name: old attribute name not pinned");
PIN_JAVA_STRING(ENVONLY, new_attr_name, newAttrName, NULL,
"H5Arename_by_name: new attribute name not pinned");
if ((retVal = H5Arename_by_name((hid_t)loc_id, objName, oldAttrName, newAttrName, (hid_t)lapl_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (newAttrName)
UNPIN_JAVA_STRING(ENVONLY, new_attr_name, newAttrName);
if (oldAttrName)
UNPIN_JAVA_STRING(ENVONLY, old_attr_name, oldAttrName);
if (objName)
UNPIN_JAVA_STRING(ENVONLY, obj_name, objName);
return (jint)retVal;
} /* end Java_hdf_hdf5lib_H5_H5Arename_1by_1name */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aget_name_by_idx
* Signature: (JLjava/lang/String;IIJJ)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
Java_hdf_hdf5lib_H5_H5Aget_1name_1by_1idx(JNIEnv *env, jclass clss, jlong loc_id, jstring obj_name,
jint idx_type, jint order, jlong n, jlong lapl_id)
{
const char *objName = NULL;
jstring str = NULL;
ssize_t status_size = -1;
char *attrName = NULL;
UNUSED(clss);
if (NULL == obj_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Aget_name_by_idx: object name is NULL");
PIN_JAVA_STRING(ENVONLY, obj_name, objName, NULL, "H5Aget_name_by_idx: object name not pinned");
/* Get the length of the attribute name */
if ((status_size =
H5Aget_name_by_idx((hid_t)loc_id, objName, (H5_index_t)idx_type, (H5_iter_order_t)order,
(hsize_t)n, (char *)NULL, (size_t)0, (hid_t)lapl_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (attrName = (char *)malloc(sizeof(char) * (size_t)status_size + 1)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Aget_name_by_idx: failed to allocate buffer for attribute name");
if ((H5Aget_name_by_idx((hid_t)loc_id, objName, (H5_index_t)idx_type, (H5_iter_order_t)order, (hsize_t)n,
(char *)attrName, (size_t)status_size + 1, (hid_t)lapl_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
attrName[status_size] = '\0';
if (NULL == (str = ENVPTR->NewStringUTF(ENVONLY, attrName)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
done:
if (attrName)
free(attrName);
if (objName)
UNPIN_JAVA_STRING(ENVONLY, obj_name, objName);
return str;
} /* end Java_hdf_hdf5lib_H5_H5Aget_1name_1by_1idx */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aget_storage_size
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5_H5Aget_1storage_1size(JNIEnv *env, jclass clss, jlong attr_id)
{
hsize_t retVal = 0;
UNUSED(clss);
if (!(retVal = H5Aget_storage_size((hid_t)attr_id)))
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jlong)retVal;
} /* end Java_hdf_hdf5lib_H5_H5Aget_1storage_1size */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aget_info
* Signature: (J)Lhdf/hdf5lib/structs/H5A_info_t;
*/
JNIEXPORT jobject JNICALL
Java_hdf_hdf5lib_H5_H5Aget_1info(JNIEnv *env, jclass clss, jlong attr_id)
{
H5A_info_t ainfo;
jobject ret_obj = NULL;
jvalue args[4];
UNUSED(clss);
if (H5Aget_info((hid_t)attr_id, &ainfo) < 0)
H5_LIBRARY_ERROR(ENVONLY);
args[0].z = ainfo.corder_valid;
args[1].j = ainfo.corder;
args[2].i = ainfo.cset;
args[3].j = (jlong)ainfo.data_size;
CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5A_info_t", "(ZJIJ)V", args, ret_obj);
done:
return ret_obj;
} /* end Java_hdf_hdf5lib_H5_H5Aget_1info */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aget_info_by_idx
* Signature: (JLjava/lang/String;IIJJ)Lhdf/hdf5lib/structs/H5A_info_t;
*/
JNIEXPORT jobject JNICALL
Java_hdf_hdf5lib_H5_H5Aget_1info_1by_1idx(JNIEnv *env, jclass clss, jlong loc_id, jstring obj_name,
jint idx_type, jint order, jlong n, jlong lapl_id)
{
const char *objName = NULL;
H5A_info_t ainfo;
herr_t status;
jvalue args[4];
jobject ret_obj = NULL;
UNUSED(clss);
if (NULL == obj_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Aget_info_by_idx: object name is NULL");
PIN_JAVA_STRING(ENVONLY, obj_name, objName, NULL, "H5Aget_info_by_idx: object name not pinned");
if ((status = H5Aget_info_by_idx((hid_t)loc_id, objName, (H5_index_t)idx_type, (H5_iter_order_t)order,
(hsize_t)n, &ainfo, (hid_t)lapl_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
args[0].z = ainfo.corder_valid;
args[1].j = ainfo.corder;
args[2].i = ainfo.cset;
args[3].j = (jlong)ainfo.data_size;
CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5A_info_t", "(ZJIJ)V", args, ret_obj);
done:
if (objName)
UNPIN_JAVA_STRING(ENVONLY, obj_name, objName);
return ret_obj;
} /* end Java_hdf_hdf5lib_H5_H5Aget_1info_1by_1idx */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aget_info_by_name
* Signature: (JLjava/lang/String;Ljava/lang/String;J)Lhdf/hdf5lib/structs/H5A_info_t;
*/
JNIEXPORT jobject JNICALL
Java_hdf_hdf5lib_H5_H5Aget_1info_1by_1name(JNIEnv *env, jclass clss, jlong loc_id, jstring obj_name,
jstring attr_name, jlong lapl_id)
{
const char *objName = NULL;
const char *attrName = NULL;
H5A_info_t ainfo;
herr_t status;
jvalue args[4];
jobject ret_obj = NULL;
UNUSED(clss);
if (NULL == obj_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Aget_info_by_name: object name is NULL");
if (NULL == attr_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Aget_info_by_name: attribute name is NULL");
PIN_JAVA_STRING(ENVONLY, obj_name, objName, NULL, "H5Aget_info_by_name: object name not pinned");
PIN_JAVA_STRING(ENVONLY, attr_name, attrName, NULL, "H5Aget_info_by_name: attribute name not pinned");
if ((status = H5Aget_info_by_name((hid_t)loc_id, objName, attrName, &ainfo, (hid_t)lapl_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
args[0].z = ainfo.corder_valid;
args[1].j = ainfo.corder;
args[2].i = ainfo.cset;
args[3].j = (jlong)ainfo.data_size;
CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5A_info_t", "(ZJIJ)V", args, ret_obj);
done:
if (attrName)
UNPIN_JAVA_STRING(ENVONLY, attr_name, attrName);
if (objName)
UNPIN_JAVA_STRING(ENVONLY, obj_name, objName);
return ret_obj;
} /* end Java_hdf_hdf5lib_H5_H5Aget_1info_1by_1name */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Adelete_by_name
* Signature: (JLjava/lang/String;Ljava/lang/String;J)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Adelete_1by_1name(JNIEnv *env, jclass clss, jlong loc_id, jstring obj_name,
jstring attr_name, jlong lapl_id)
{
const char *objName = NULL;
const char *attrName = NULL;
herr_t retVal = FAIL;
UNUSED(clss);
if (NULL == obj_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Adelete_by_name: object name is NULL");
if (NULL == attr_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Adelete_by_name: attribute name is NULL");
PIN_JAVA_STRING(ENVONLY, obj_name, objName, NULL, "H5Adelete_by_name: object name not pinned");
PIN_JAVA_STRING(ENVONLY, attr_name, attrName, NULL, "H5Adelete_by_name: attribute name not pinned");
if ((retVal = H5Adelete_by_name((hid_t)loc_id, objName, attrName, (hid_t)lapl_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (attrName)
UNPIN_JAVA_STRING(ENVONLY, attr_name, attrName);
if (objName)
UNPIN_JAVA_STRING(ENVONLY, obj_name, objName);
return (jint)retVal;
} /* end Java_hdf_hdf5lib_H5_H5Adelete_1by_1name */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aexists
* Signature: (JLjava/lang/String;)Z
*/
JNIEXPORT jboolean JNICALL
Java_hdf_hdf5lib_H5_H5Aexists(JNIEnv *env, jclass clss, jlong obj_id, jstring attr_name)
{
const char *attrName = NULL;
htri_t bval = JNI_FALSE;
UNUSED(clss);
if (NULL == attr_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Aexists: attribute name is NULL");
PIN_JAVA_STRING(ENVONLY, attr_name, attrName, NULL, "H5Aexists: attribute name not pinned");
if ((bval = H5Aexists((hid_t)obj_id, attrName)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
bval = (bval > 0) ? JNI_TRUE : JNI_FALSE;
done:
if (attrName)
UNPIN_JAVA_STRING(ENVONLY, attr_name, attrName);
return (jboolean)bval;
} /* end Java_hdf_hdf5lib_H5_H5Aexists */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Adelete_by_idx
* Signature: (JLjava/lang/String;IIJJ)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Adelete_1by_1idx(JNIEnv *env, jclass clss, jlong loc_id, jstring obj_name,
jint idx_type, jint order, jlong n, jlong lapl_id)
{
const char *objName = NULL;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == obj_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Adelete_by_idx: object name is NULL");
PIN_JAVA_STRING(ENVONLY, obj_name, objName, NULL, "H5Adelete_by_idx: object name not pinned");
if ((status = H5Adelete_by_idx((hid_t)loc_id, objName, (H5_index_t)idx_type, (H5_iter_order_t)order,
(hsize_t)n, (hid_t)lapl_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (objName)
UNPIN_JAVA_STRING(ENVONLY, obj_name, objName);
} /* end Java_hdf_hdf5lib_H5_H5Adelete_1by_1idx */
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Aopen_by_name
* Signature: (JLjava/lang/String;Ljava/lang/String;JJ)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Aopen_1by_1name(JNIEnv *env, jclass clss, jlong loc_id, jstring obj_name,
jstring attr_name, jlong aapl_id, jlong lapl_id)
{
const char *attrName = NULL;
const char *objName = NULL;
hid_t status = H5I_INVALID_HID;
UNUSED(clss);
if (NULL == obj_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Aopen_by_name: object name is NULL");
if (NULL == attr_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Aopen_by_name: attribute name is NULL");
PIN_JAVA_STRING(ENVONLY, obj_name, objName, NULL, "H5Aopen_by_name: object name not pinned");
PIN_JAVA_STRING(ENVONLY, attr_name, attrName, NULL, "H5Aopen_by_name: attribute name not pinned");
if ((status = H5Aopen_by_name((hid_t)loc_id, objName, attrName, (hid_t)aapl_id, (hid_t)lapl_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (attrName)
UNPIN_JAVA_STRING(ENVONLY, attr_name, attrName);
if (objName)
UNPIN_JAVA_STRING(ENVONLY, obj_name, objName);
return (jlong)status;
} /* end Java_hdf_hdf5lib_H5__1H5Aopen_1by_1name */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aget_create_plist
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Aget_1create_1plist(JNIEnv *env, jclass clss, jlong attr_id)
{
hid_t retVal = H5I_INVALID_HID;
UNUSED(clss);
if ((retVal = H5Aget_create_plist((hid_t)attr_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jlong)retVal;
} /* end Java_hdf_hdf5lib_H5__1H5Aget_1create_1plist */
static herr_t
H5A_iterate_cb(hid_t g_id, const char *name, const H5A_info_t *info, void *cb_data)
{
cb_wrapper *wrapper = (cb_wrapper *)cb_data;
jmethodID mid;
jobject cb_info_t = NULL;
jobject visit_callback = wrapper->visit_callback;
jstring str;
JNIEnv *cbenv = NULL;
jclass cbcls;
jvalue args[4];
void *op_data = (void *)wrapper->op_data;
jint status = -1;
if (JVMPTR->AttachCurrentThread(JVMPAR, (void **)&cbenv, NULL) < 0) {
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_TRUE);
H5_JNI_FATAL_ERROR(CBENVONLY, "H5A_iterate_cb: failed to attach current thread to JVM");
}
if (NULL == (cbcls = CBENVPTR->GetObjectClass(CBENVONLY, visit_callback)))
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_FALSE);
if (NULL ==
(mid = CBENVPTR->GetMethodID(
CBENVONLY, cbcls, "callback",
"(JLjava/lang/String;Lhdf/hdf5lib/structs/H5A_info_t;Lhdf/hdf5lib/callbacks/H5A_iterate_t;)I")))
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_FALSE);
if (NULL == (str = CBENVPTR->NewStringUTF(CBENVONLY, name)))
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_FALSE);
args[0].z = info->corder_valid;
args[1].j = info->corder;
args[2].i = info->cset;
args[3].j = (jlong)info->data_size;
CALL_CONSTRUCTOR(CBENVONLY, "hdf/hdf5lib/structs/H5A_info_t", "(ZJIJ)V", args, cb_info_t);
status = CBENVPTR->CallIntMethod(CBENVONLY, visit_callback, mid, g_id, str, cb_info_t, op_data);
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_FALSE);
done:
if (cbenv)
JVMPTR->DetachCurrentThread(JVMPAR);
return (herr_t)status;
} /* end H5A_iterate_cb */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aiterate
* Signature: (JIIJLjava/lang/Object;Ljava/lang/Object;)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Aiterate(JNIEnv *env, jclass clss, jlong grp_id, jint idx_type, jint order, jlong idx,
jobject callback_op, jobject op_data)
{
cb_wrapper wrapper = {callback_op, op_data};
hsize_t start_idx = (hsize_t)idx;
herr_t status = FAIL;
UNUSED(clss);
ENVPTR->GetJavaVM(ENVONLY, &jvm);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
if (NULL == op_data)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Aiterate: op_data is NULL");
if (NULL == callback_op)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Aiterate: callback_op is NULL");
if ((status = H5Aiterate2((hid_t)grp_id, (H5_index_t)idx_type, (H5_iter_order_t)order,
(hsize_t *)&start_idx, (H5A_operator2_t)H5A_iterate_cb, (void *)&wrapper)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Aiterate */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aiterate_by_name
* Signature: (JLjava/lang/String;IIJLjava/lang/Object;Ljava/lang/Object;J)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Aiterate_1by_1name(JNIEnv *env, jclass clss, jlong grp_id, jstring name, jint idx_type,
jint order, jlong idx, jobject callback_op, jobject op_data,
jlong access_id)
{
const char *objName = NULL;
cb_wrapper wrapper = {callback_op, op_data};
hsize_t start_idx = (hsize_t)idx;
herr_t status = FAIL;
UNUSED(clss);
ENVPTR->GetJavaVM(ENVONLY, &jvm);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
if (NULL == op_data)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Aiterate_by_name: op_data is NULL");
if (NULL == callback_op)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Aiterate_by_name: callback_op is NULL");
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Aiterate_by_name: object name is NULL");
PIN_JAVA_STRING(ENVONLY, name, objName, NULL, "H5Aiterate_by_name: object name not pinned");
if ((status = H5Aiterate_by_name((hid_t)grp_id, objName, (H5_index_t)idx_type, (H5_iter_order_t)order,
(hsize_t *)&start_idx, (H5A_operator2_t)H5A_iterate_cb, (void *)&wrapper,
(hid_t)access_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (objName)
UNPIN_JAVA_STRING(ENVONLY, name, objName);
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Aiterate_1by_1name */
#ifdef __cplusplus
} /* end extern "C" */
#endif /* __cplusplus */
+378
View File
@@ -0,0 +1,378 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <jni.h>
/* Header for class hdf_hdf5lib_H5_H5A */
#ifndef Included_hdf_hdf5lib_H5_H5A
#define Included_hdf_hdf5lib_H5_H5A
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Acreate
* Signature: (JLjava/lang/String;JJJ)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Acreate(JNIEnv *, jclass, jlong, jstring, jlong, jlong,
jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Aopen_name
* Signature: (JLjava/lang/String;)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Aopen_1name(JNIEnv *, jclass, jlong, jstring);
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Aopen_idx
* Signature: (JI)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Aopen_1idx(JNIEnv *, jclass, jlong, jint);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aread
* Signature: (JJ[B)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Aread(JNIEnv *, jclass, jlong, jlong, jbyteArray, jboolean);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Awrite
* Signature: (JJ[B)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Awrite(JNIEnv *, jclass, jlong, jlong, jbyteArray, jboolean);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aread_short
* Signature: (JJ[SZ)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Aread_1short(JNIEnv *, jclass, jlong, jlong, jshortArray,
jboolean);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Awrite_short
* Signature: (JJ[SZ)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Awrite_1short(JNIEnv *, jclass, jlong, jlong, jshortArray,
jboolean);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aread_int
* Signature: (JJ[IZ)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Aread_1int(JNIEnv *, jclass, jlong, jlong, jintArray, jboolean);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Awrite_int
* Signature: (JJ[IZ)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Awrite_1int(JNIEnv *, jclass, jlong, jlong, jintArray, jboolean);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aread_long
* Signature: (JJ[JZ)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Aread_1long(JNIEnv *, jclass, jlong, jlong, jlongArray,
jboolean);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Awrite_long
* Signature: (JJ[JZ)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Awrite_1long(JNIEnv *, jclass, jlong, jlong, jlongArray,
jboolean);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aread_float
* Signature: (JJ[FZ)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Aread_1float(JNIEnv *, jclass, jlong, jlong, jfloatArray,
jboolean);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Awrite_float
* Signature: (JJ[FZ)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Awrite_1float(JNIEnv *, jclass, jlong, jlong, jfloatArray,
jboolean);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aread_double
* Signature: (JJ[DZ)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Aread_1double(JNIEnv *, jclass, jlong, jlong, jdoubleArray,
jboolean);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Awrite_double
* Signature: (JJ[DZ)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Awrite_1double(JNIEnv *, jclass, jlong, jlong, jdoubleArray,
jboolean);
/*
* Class: hdf_hdf5lib_H5
* Method: H5AreadVL
* Signature: (JJ[Ljava/util/ArrayList;)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5AreadVL(JNIEnv *, jclass, jlong, jlong, jobjectArray);
/*
* Class: hdf_hdf5lib_H5
* Method: H5AwriteVL
* Signature: (JJ[Ljava/util/ArrayList;)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5AwriteVL(JNIEnv *, jclass, jlong, jlong, jobjectArray);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aread_string
* Signature: (JJ[Ljava/lang/String;)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Aread_1string(JNIEnv *, jclass, jlong, jlong, jobjectArray);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Awrite_string
* Signature: (JJ[Ljava/lang/String;)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Awrite_1string(JNIEnv *, jclass, jlong, jlong, jobjectArray);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aread_VLStrings
* Signature: (JJ[Ljava/lang/String;)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Aread_1VLStrings(JNIEnv *, jclass, jlong, jlong, jobjectArray);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Awrite_VLStrings
* Signature: (JJ[B)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Awrite_1VLStrings(JNIEnv *, jclass, jlong, jlong, jobjectArray);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aread_reg_ref
* Signature: (JJ[Ljava/lang/String;)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Aread_1reg_1ref(JNIEnv *, jclass, jlong, jlong, jobjectArray);
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Aget_space
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Aget_1space(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Aget_type
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Aget_1type(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aget_name
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_hdf_hdf5lib_H5_H5Aget_1name(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aget_num_attrs
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Aget_1num_1attrs(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Adelete
* Signature: (JLjava/lang/String;)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Adelete(JNIEnv *, jclass, jlong, jstring);
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Aclose
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5__1H5Aclose(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Acreate2
* Signature: (JLjava/lang/String;JJJJ)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Acreate2(JNIEnv *, jclass, jlong, jstring, jlong, jlong,
jlong, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Aopen
* Signature: (JLjava/lang/String;J)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Aopen(JNIEnv *, jclass, jlong, jstring, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Aopen_by_idx
* Signature: (JLjava/lang/String;IIJJJ)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Aopen_1by_1idx(JNIEnv *, jclass, jlong, jstring, jint, jint,
jlong, jlong, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Acreate_by_name
* Signature: (JLjava/lang/String;Ljava/lang/String;JJJJJ)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Acreate_1by_1name(JNIEnv *, jclass, jlong, jstring, jstring,
jlong, jlong, jlong, jlong, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aexists_by_name
* Signature: (JLjava/lang/String;Ljava/lang/String;J)Z
*/
JNIEXPORT jboolean JNICALL Java_hdf_hdf5lib_H5_H5Aexists_1by_1name(JNIEnv *, jclass, jlong, jstring, jstring,
jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Arename
* Signature: (JLjava/lang/String;Ljava/lang/String)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Arename(JNIEnv *, jclass, jlong, jstring, jstring);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Arename_by_name
* Signature: (JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;J)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Arename_1by_1name(JNIEnv *, jclass, jlong, jstring, jstring,
jstring, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aget_name_by_idx
* Signature: (JLjava/lang/String;IIJJ)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_hdf_hdf5lib_H5_H5Aget_1name_1by_1idx(JNIEnv *, jclass, jlong, jstring, jint,
jint, jlong, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aget_storage_size
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Aget_1storage_1size(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aget_info
* Signature: (J)Lhdf/hdf5lib/structs/H5A_info_t;
*/
JNIEXPORT jobject JNICALL Java_hdf_hdf5lib_H5_H5Aget_1info(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aget_info_by_idx
* Signature: (JLjava/lang/String;IIJJ)Lhdf/hdf5lib/structs/H5A_info_t;
*/
JNIEXPORT jobject JNICALL Java_hdf_hdf5lib_H5_H5Aget_1info_1by_1idx(JNIEnv *, jclass, jlong, jstring, jint,
jint, jlong, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aget_info_by_name
* Signature: (JLjava/lang/String;Ljava/lang/String;J)Lhdf/hdf5lib/structs/H5A_info_t;
*/
JNIEXPORT jobject JNICALL Java_hdf_hdf5lib_H5_H5Aget_1info_1by_1name(JNIEnv *, jclass, jlong, jstring,
jstring, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Adelete_by_name
* Signature: (JLjava/lang/String;Ljava/lang/String;J)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Adelete_1by_1name(JNIEnv *, jclass, jlong, jstring, jstring,
jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aexists
* Signature: (JLjava/lang/String;)Z
*/
JNIEXPORT jboolean JNICALL Java_hdf_hdf5lib_H5_H5Aexists(JNIEnv *, jclass, jlong, jstring);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Adelete_by_idx
* Signature: (JLjava/lang/String;IIJJ)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Adelete_1by_1idx(JNIEnv *, jclass, jlong, jstring, jint, jint,
jlong, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Aopen_by_name
* Signature: (JLjava/lang/String;Ljava/lang/String;JJ)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Aopen_1by_1name(JNIEnv *, jclass, jlong, jstring, jstring,
jlong, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Aget_create_plist
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Aget_1create_1plist(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aiterate
* Signature: (JIIJLjava/lang/Object;Ljava/lang/Object;)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Aiterate(JNIEnv *, jclass, jlong, jint, jint, jlong, jobject,
jobject);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Aiterate_by_name
* Signature: (JLjava/lang/String;IIJLjava/lang/Object;Ljava/lang/Object;J)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Aiterate_1by_1name(JNIEnv *, jclass, jlong, jstring, jint, jint,
jlong, jobject, jobject, jlong);
#ifdef __cplusplus
} /* end extern "C" */
#endif /* __cplusplus */
#endif /* Included_hdf_hdf5lib_H5_H5A */
+2156
View File
@@ -0,0 +1,2156 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include <jni.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "hdf5.h"
#include "h5util.h"
#include "h5jni.h"
#include "h5dImp.h"
/*
* Pointer to the JNI's Virtual Machine; used for callback functions.
*/
extern JavaVM *jvm;
typedef struct _cb_wrapper {
jobject visit_callback;
jobject op_data;
} cb_wrapper;
/********************/
/* Local Prototypes */
/********************/
static herr_t H5DreadVL_asstr(JNIEnv *env, hid_t did, hid_t tid, hid_t mem_sid, hid_t file_sid,
hid_t xfer_plist_id, jobjectArray buf);
static herr_t H5DreadVL_str(JNIEnv *env, hid_t did, hid_t tid, hid_t mem_sid, hid_t file_sid,
hid_t xfer_plist_id, jobjectArray buf);
static herr_t H5DwriteVL_asstr(JNIEnv *env, hid_t did, hid_t tid, hid_t mem_sid, hid_t file_sid,
hid_t xfer_plist_id, jobjectArray buf);
static herr_t H5DwriteVL_str(JNIEnv *env, hid_t did, hid_t tid, hid_t mem_sid, hid_t file_sid,
hid_t xfer_plist_id, jobjectArray buf);
/********************/
/* Local Macros */
/********************/
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Dcreate
* Signature: (JLjava/lang/String;JJJ)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Dcreate(JNIEnv *env, jclass clss, jlong loc_id, jstring name, jlong type_id,
jlong space_id, jlong create_plist_id)
{
const char *dsetName = NULL;
hid_t dset_id = H5I_INVALID_HID;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Dcreate: dataset name is NULL");
PIN_JAVA_STRING(ENVONLY, name, dsetName, NULL, "H5Dcreate: dataset name not pinned");
if ((dset_id = H5Dcreate2((hid_t)loc_id, dsetName, (hid_t)type_id, (hid_t)space_id, H5P_DEFAULT,
(hid_t)create_plist_id, H5P_DEFAULT)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (dsetName)
UNPIN_JAVA_STRING(ENVONLY, name, dsetName);
return (jlong)dset_id;
} /* end Java_hdf_hdf5lib_H5__1H5Dcreate */
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Dopen
* Signature: (JLjava/lang/String;)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Dopen(JNIEnv *env, jclass clss, jlong loc_id, jstring name)
{
const char *dsetName = NULL;
hid_t dset_id = H5I_INVALID_HID;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Dopen: dataset name is NULL");
PIN_JAVA_STRING(ENVONLY, name, dsetName, NULL, "H5Dopen: dataset name not pinned");
if ((dset_id = H5Dopen2((hid_t)loc_id, dsetName, H5P_DEFAULT)))
H5_LIBRARY_ERROR(ENVONLY);
done:
if (dsetName)
UNPIN_JAVA_STRING(ENVONLY, name, dsetName);
return (jlong)dset_id;
} /* end Java_hdf_hdf5lib_H5__1H5Dopen */
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Dget_space
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Dget_1space(JNIEnv *env, jclass clss, jlong dataset_id)
{
hid_t retVal = H5I_INVALID_HID;
UNUSED(clss);
if ((retVal = H5Dget_space((hid_t)dataset_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jlong)retVal;
} /* end Java_hdf_hdf5lib_H5__1H5Dget_1space */
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Dget_type
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Dget_1type(JNIEnv *env, jclass clss, jlong dataset_id)
{
hid_t retVal = H5I_INVALID_HID;
UNUSED(clss);
if ((retVal = H5Dget_type((hid_t)dataset_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jlong)retVal;
} /* end Java_hdf_hdf5lib_H5__1H5Dget_1type */
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Dget_create_plist
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Dget_1create_1plist(JNIEnv *env, jclass clss, jlong dataset_id)
{
hid_t retVal = H5I_INVALID_HID;
UNUSED(clss);
if ((retVal = H5Dget_create_plist((hid_t)dataset_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jlong)retVal;
} /* end Java_hdf_hdf5lib_H5__1H5Dget_1create_1plist */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dread
* Signature: (JJJJJ[BZ)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Dread(JNIEnv *env, jclass clss, jlong dataset_id, jlong mem_type_id, jlong mem_space_id,
jlong file_space_id, jlong xfer_plist_id, jbyteArray buf,
jboolean isCriticalPinning)
{
jboolean readBufIsCopy;
jbyte *readBuf = NULL;
size_t typeSize;
H5T_class_t type_class;
jsize vl_array_len = 0; // Only used by vl_data_class types
htri_t vl_data_class;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Dread: read buffer is NULL");
if ((vl_data_class = h5str_detect_vlen(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (vl_data_class) {
/* Get size of data array */
if ((vl_array_len = ENVPTR->GetArrayLength(ENVONLY, buf)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Dread: readBuf length < 0");
}
if (!(typeSize = H5Tget_size(mem_type_id)))
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (readBuf = calloc((size_t)vl_array_len, typeSize)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Dread: failed to allocate raw VL read buffer");
}
else {
if (isCriticalPinning) {
PIN_BYTE_ARRAY_CRITICAL(ENVONLY, buf, readBuf, &readBufIsCopy,
"H5Dread: read buffer not critically pinned");
}
else {
PIN_BYTE_ARRAY(ENVONLY, buf, readBuf, &readBufIsCopy, "H5Dread: read buffer not pinned");
}
}
if ((status = H5Dread((hid_t)dataset_id, (hid_t)mem_type_id, (hid_t)mem_space_id, (hid_t)file_space_id,
(hid_t)xfer_plist_id, (void *)readBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (vl_data_class) {
if ((type_class = H5Tget_class((hid_t)mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
translate_rbuf(env, buf, mem_type_id, type_class, vl_array_len, readBuf);
}
done:
if (readBuf) {
if ((status >= 0) && vl_data_class)
H5Treclaim(dataset_id, mem_space_id, H5P_DEFAULT, readBuf);
if (vl_data_class) {
free(readBuf);
}
else {
if (isCriticalPinning) {
UNPIN_ARRAY_CRITICAL(ENVONLY, buf, readBuf, (status < 0) ? JNI_ABORT : 0);
}
else {
UNPIN_BYTE_ARRAY(ENVONLY, buf, readBuf, (status < 0) ? JNI_ABORT : 0);
}
}
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Dread */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dwrite
* Signature: (JJJJJ[BZ)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Dwrite(JNIEnv *env, jclass clss, jlong dataset_id, jlong mem_type_id,
jlong mem_space_id, jlong file_space_id, jlong xfer_plist_id, jbyteArray buf,
jboolean isCriticalPinning)
{
jboolean writeBufIsCopy;
jbyte *writeBuf = NULL;
size_t typeSize;
H5T_class_t type_class;
jsize vl_array_len = 0; // Only used by vl_data_class types
htri_t vl_data_class;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Dwrite: write buffer is NULL");
if ((vl_data_class = h5str_detect_vlen(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (vl_data_class) {
/* Get size of data array */
if ((vl_array_len = ENVPTR->GetArrayLength(ENVONLY, buf)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Dwrite: write buffer length < 0");
}
if (!(typeSize = H5Tget_size(mem_type_id)))
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (writeBuf = calloc((size_t)vl_array_len, typeSize)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Dwrite: failed to allocate raw VL write buffer");
}
else {
if (isCriticalPinning) {
PIN_BYTE_ARRAY_CRITICAL(ENVONLY, buf, writeBuf, &writeBufIsCopy,
"H5Dwrite: write buffer not critically pinned");
}
else {
PIN_BYTE_ARRAY(ENVONLY, buf, writeBuf, &writeBufIsCopy, "H5Dwrite: write buffer not pinned");
}
}
if (vl_data_class) {
if ((type_class = H5Tget_class((hid_t)mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
translate_wbuf(ENVONLY, buf, mem_type_id, type_class, vl_array_len, writeBuf);
}
if ((status = H5Dwrite((hid_t)dataset_id, (hid_t)mem_type_id, (hid_t)mem_space_id, (hid_t)file_space_id,
(hid_t)xfer_plist_id, writeBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (writeBuf) {
if ((status >= 0) && vl_data_class)
H5Treclaim(dataset_id, mem_space_id, H5P_DEFAULT, writeBuf);
if (vl_data_class) {
free(writeBuf);
}
else {
if (isCriticalPinning) {
UNPIN_ARRAY_CRITICAL(ENVONLY, buf, writeBuf, (status < 0) ? JNI_ABORT : 0);
}
else {
UNPIN_BYTE_ARRAY(ENVONLY, buf, writeBuf, (status < 0) ? JNI_ABORT : 0);
}
}
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Dwrite */
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Dclose
* Signature: (J)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5__1H5Dclose(JNIEnv *env, jclass clss, jlong dataset_id)
{
herr_t retVal = FAIL;
UNUSED(clss);
if ((retVal = H5Dclose((hid_t)dataset_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jint)retVal;
} /* end Java_hdf_hdf5lib_H5__1H5Dclose */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dget_storage_size
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5_H5Dget_1storage_1size(JNIEnv *env, jclass clss, jlong dataset_id)
{
hsize_t retVal = 0;
UNUSED(clss);
if (dataset_id < 0)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Dget_storage_size: not a dataset");
if (!(retVal = H5Dget_storage_size((hid_t)dataset_id)))
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jlong)retVal;
} /* end Java_hdf_hdf5lib_H5_H5Dget_1storage_1size */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dvlen_reclaim
* Signature: (JJJ[B)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Dvlen_1reclaim(JNIEnv *env, jclass clss, jlong type_id, jlong space_id,
jlong xfer_plist_id, jbyteArray buf)
{
#ifndef H5_NO_DEPRECATED_SYMBOLS
jboolean vlenBufIsCopy;
jbyte *vlenBuf = NULL;
#endif
herr_t status = FAIL;
UNUSED(clss);
#ifdef H5_NO_DEPRECATED_SYMBOLS
UNUSED(type_id);
UNUSED(space_id);
UNUSED(xfer_plist_id);
UNUSED(buf);
H5_UNIMPLEMENTED(ENVONLY, "H5Dvlen_reclaim: not implemented");
#else
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Dvlen_reclaim: buffer is NULL");
PIN_BYTE_ARRAY(ENVONLY, buf, vlenBuf, &vlenBufIsCopy, "H5Dvlen_reclaim: buffer not pinned");
if ((status = H5Dvlen_reclaim((hid_t)type_id, (hid_t)space_id, (hid_t)xfer_plist_id, vlenBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
#endif
done:
#ifndef H5_NO_DEPRECATED_SYMBOLS
if (vlenBuf)
UNPIN_BYTE_ARRAY(ENVONLY, buf, vlenBuf, (status < 0) ? JNI_ABORT : 0);
#endif
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Dvlen_1reclaim */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dread_short
* Signature: (JJJJJ[SZ)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Dread_1short(JNIEnv *env, jclass clss, jlong dataset_id, jlong mem_type_id,
jlong mem_space_id, jlong file_space_id, jlong xfer_plist_id,
jshortArray buf, jboolean isCriticalPinning)
{
jboolean readBufIsCopy;
jshort *readBuf = NULL;
htri_t vl_data_class;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Dread_short: read buffer is NULL");
/* Get size of data array */
if (ENVPTR->GetArrayLength(ENVONLY, buf) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Dread: readBuf length < 0");
}
if ((vl_data_class = h5str_detect_vlen(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (isCriticalPinning) {
PIN_SHORT_ARRAY_CRITICAL(ENVONLY, buf, readBuf, &readBufIsCopy,
"H5Dread_short: read buffer not critically pinned");
}
else {
PIN_SHORT_ARRAY(ENVONLY, buf, readBuf, &readBufIsCopy, "H5Dread_short: read buffer not pinned");
}
if ((status = H5Dread((hid_t)dataset_id, (hid_t)mem_type_id, (hid_t)mem_space_id, (hid_t)file_space_id,
(hid_t)xfer_plist_id, readBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (readBuf) {
if ((status >= 0) && vl_data_class)
H5Treclaim(dataset_id, mem_space_id, H5P_DEFAULT, readBuf);
if (isCriticalPinning) {
UNPIN_ARRAY_CRITICAL(ENVONLY, buf, readBuf, (status < 0) ? JNI_ABORT : 0);
}
else {
UNPIN_SHORT_ARRAY(ENVONLY, buf, readBuf, (status < 0) ? JNI_ABORT : 0);
}
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Dread_1short */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dwrite_short
* Signature: (JJJJJ[SZ)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Dwrite_1short(JNIEnv *env, jclass clss, jlong dataset_id, jlong mem_type_id,
jlong mem_space_id, jlong file_space_id, jlong xfer_plist_id,
jshortArray buf, jboolean isCriticalPinning)
{
jboolean writeBufIsCopy;
jshort *writeBuf = NULL;
htri_t vl_data_class;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Dwrite_short: write buffer is NULL");
/* Get size of data array */
if (ENVPTR->GetArrayLength(ENVONLY, buf) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Dread: readBuf length < 0");
}
if ((vl_data_class = h5str_detect_vlen(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (isCriticalPinning) {
PIN_SHORT_ARRAY_CRITICAL(ENVONLY, buf, writeBuf, &writeBufIsCopy,
"H5Dwrite_short: write buffer not critically pinned");
}
else {
PIN_SHORT_ARRAY(ENVONLY, buf, writeBuf, &writeBufIsCopy, "H5Dwrite_short: write buffer not pinned");
}
if ((status = H5Dwrite((hid_t)dataset_id, (hid_t)mem_type_id, (hid_t)mem_space_id, (hid_t)file_space_id,
(hid_t)xfer_plist_id, writeBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (writeBuf) {
if ((status >= 0) && vl_data_class)
H5Treclaim(dataset_id, mem_space_id, H5P_DEFAULT, writeBuf);
if (isCriticalPinning) {
UNPIN_ARRAY_CRITICAL(ENVONLY, buf, writeBuf, (status < 0) ? JNI_ABORT : 0);
}
else {
UNPIN_SHORT_ARRAY(ENVONLY, buf, writeBuf, (status < 0) ? JNI_ABORT : 0);
}
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Dwrite_1short */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dread_int
* Signature: (JJJJJ[IZ)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Dread_1int(JNIEnv *env, jclass clss, jlong dataset_id, jlong mem_type_id,
jlong mem_space_id, jlong file_space_id, jlong xfer_plist_id, jintArray buf,
jboolean isCriticalPinning)
{
jboolean readBufIsCopy;
jint *readBuf = NULL;
htri_t vl_data_class;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Dread_int: read buffer is NULL");
/* Get size of data array */
if (ENVPTR->GetArrayLength(ENVONLY, buf) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Dread: readBuf length < 0");
}
if ((vl_data_class = h5str_detect_vlen(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (isCriticalPinning) {
PIN_INT_ARRAY_CRITICAL(ENVONLY, buf, readBuf, &readBufIsCopy,
"H5Dread_int: read buffer not critically pinned");
}
else {
PIN_INT_ARRAY(ENVONLY, buf, readBuf, &readBufIsCopy, "H5Dread_int: read buffer not pinned");
}
if ((status = H5Dread((hid_t)dataset_id, (hid_t)mem_type_id, (hid_t)mem_space_id, (hid_t)file_space_id,
(hid_t)xfer_plist_id, readBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (readBuf) {
if ((status >= 0) && vl_data_class)
H5Treclaim(dataset_id, mem_space_id, H5P_DEFAULT, readBuf);
if (isCriticalPinning) {
UNPIN_ARRAY_CRITICAL(ENVONLY, buf, readBuf, (status < 0) ? JNI_ABORT : 0);
}
else {
UNPIN_INT_ARRAY(ENVONLY, buf, readBuf, (status < 0) ? JNI_ABORT : 0);
}
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Dread_1int */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dwrite_int
* Signature: (JJJJJ[IZ)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Dwrite_1int(JNIEnv *env, jclass clss, jlong dataset_id, jlong mem_type_id,
jlong mem_space_id, jlong file_space_id, jlong xfer_plist_id, jintArray buf,
jboolean isCriticalPinning)
{
jboolean writeBufIsCopy;
jint *writeBuf = NULL;
htri_t vl_data_class;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Dwrite_int: write buffer is NULL");
/* Get size of data array */
if (ENVPTR->GetArrayLength(ENVONLY, buf) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Dread: readBuf length < 0");
}
if ((vl_data_class = h5str_detect_vlen(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (isCriticalPinning) {
PIN_INT_ARRAY_CRITICAL(ENVONLY, buf, writeBuf, &writeBufIsCopy,
"H5Dwrite_int: write buffer not critically pinned");
}
else {
PIN_INT_ARRAY(ENVONLY, buf, writeBuf, &writeBufIsCopy, "H5Dwrite_int: write buffer not pinned");
}
if ((status = H5Dwrite((hid_t)dataset_id, (hid_t)mem_type_id, (hid_t)mem_space_id, (hid_t)file_space_id,
(hid_t)xfer_plist_id, writeBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (writeBuf) {
if ((status >= 0) && vl_data_class)
H5Treclaim(dataset_id, mem_space_id, H5P_DEFAULT, writeBuf);
if (isCriticalPinning) {
UNPIN_ARRAY_CRITICAL(ENVONLY, buf, writeBuf, (status < 0) ? JNI_ABORT : 0);
}
else {
UNPIN_INT_ARRAY(ENVONLY, buf, writeBuf, (status < 0) ? JNI_ABORT : 0);
}
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Dwrite_1int */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dread_long
* Signature: (JJJJJ[JZ)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Dread_1long(JNIEnv *env, jclass clss, jlong dataset_id, jlong mem_type_id,
jlong mem_space_id, jlong file_space_id, jlong xfer_plist_id,
jlongArray buf, jboolean isCriticalPinning)
{
jboolean readBufIsCopy;
jlong *readBuf = NULL;
htri_t vl_data_class;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Dread_long: read buffer is NULL");
/* Get size of data array */
if (ENVPTR->GetArrayLength(ENVONLY, buf) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Dread: readBuf length < 0");
}
if ((vl_data_class = h5str_detect_vlen(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (isCriticalPinning) {
PIN_LONG_ARRAY_CRITICAL(ENVONLY, buf, readBuf, &readBufIsCopy,
"H5Dread_long: read buffer not critically pinned");
}
else {
PIN_LONG_ARRAY(ENVONLY, buf, readBuf, &readBufIsCopy, "H5Dread_long: read buffer not pinned");
}
if ((status = H5Dread((hid_t)dataset_id, (hid_t)mem_type_id, (hid_t)mem_space_id, (hid_t)file_space_id,
(hid_t)xfer_plist_id, readBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (readBuf) {
if ((status >= 0) && vl_data_class)
H5Treclaim(dataset_id, mem_space_id, H5P_DEFAULT, readBuf);
if (isCriticalPinning) {
UNPIN_ARRAY_CRITICAL(ENVONLY, buf, readBuf, (status < 0) ? JNI_ABORT : 0);
}
else {
UNPIN_LONG_ARRAY(ENVONLY, buf, readBuf, (status < 0) ? JNI_ABORT : 0);
}
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Dread_1long */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dwrite_long
* Signature: (JJJJJ[JZ)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Dwrite_1long(JNIEnv *env, jclass clss, jlong dataset_id, jlong mem_type_id,
jlong mem_space_id, jlong file_space_id, jlong xfer_plist_id,
jlongArray buf, jboolean isCriticalPinning)
{
jboolean writeBufIsCopy;
jlong *writeBuf = NULL;
htri_t vl_data_class;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Dwrite_long: write buffer is NULL");
/* Get size of data array */
if (ENVPTR->GetArrayLength(ENVONLY, buf) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Aread: readBuf length < 0");
}
if ((vl_data_class = h5str_detect_vlen(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (isCriticalPinning) {
PIN_LONG_ARRAY_CRITICAL(ENVONLY, buf, writeBuf, &writeBufIsCopy,
"H5Dwrite_long: write buffer not critically pinned");
}
else {
PIN_LONG_ARRAY(ENVONLY, buf, writeBuf, &writeBufIsCopy, "H5Dwrite_long: write buffer not pinned");
}
if ((status = H5Dwrite((hid_t)dataset_id, (hid_t)mem_type_id, (hid_t)mem_space_id, (hid_t)file_space_id,
(hid_t)xfer_plist_id, writeBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (writeBuf) {
if ((status >= 0) && vl_data_class)
H5Treclaim(dataset_id, mem_space_id, H5P_DEFAULT, writeBuf);
if (isCriticalPinning) {
UNPIN_ARRAY_CRITICAL(ENVONLY, buf, writeBuf, (status < 0) ? JNI_ABORT : 0);
}
else {
UNPIN_LONG_ARRAY(ENVONLY, buf, writeBuf, (status < 0) ? JNI_ABORT : 0);
}
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Dwrite_1long */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dread_float
* Signature: (JJJJJ[FZ)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Dread_1float(JNIEnv *env, jclass clss, jlong dataset_id, jlong mem_type_id,
jlong mem_space_id, jlong file_space_id, jlong xfer_plist_id,
jfloatArray buf, jboolean isCriticalPinning)
{
jboolean readBufIsCopy;
jfloat *readBuf = NULL;
htri_t vl_data_class;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Dread_float: read buffer is NULL");
/* Get size of data array */
if (ENVPTR->GetArrayLength(ENVONLY, buf) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Aread: readBuf length < 0");
}
if ((vl_data_class = h5str_detect_vlen(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (isCriticalPinning) {
PIN_FLOAT_ARRAY_CRITICAL(ENVONLY, buf, readBuf, &readBufIsCopy,
"H5Dread_float: read buffer not critically pinned");
}
else {
PIN_FLOAT_ARRAY(ENVONLY, buf, readBuf, &readBufIsCopy, "H5Dread_float: read buffer not pinned");
}
if ((status = H5Dread((hid_t)dataset_id, (hid_t)mem_type_id, (hid_t)mem_space_id, (hid_t)file_space_id,
(hid_t)xfer_plist_id, readBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (readBuf) {
if ((status >= 0) && vl_data_class)
H5Treclaim(dataset_id, mem_space_id, H5P_DEFAULT, readBuf);
if (isCriticalPinning) {
UNPIN_ARRAY_CRITICAL(ENVONLY, buf, readBuf, (status < 0) ? JNI_ABORT : 0);
}
else {
UNPIN_FLOAT_ARRAY(ENVONLY, buf, readBuf, (status < 0) ? JNI_ABORT : 0);
}
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Dread_1float */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dwrite_float
* Signature: (JJJJJ[FZ)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Dwrite_1float(JNIEnv *env, jclass clss, jlong dataset_id, jlong mem_type_id,
jlong mem_space_id, jlong file_space_id, jlong xfer_plist_id,
jfloatArray buf, jboolean isCriticalPinning)
{
jboolean writeBufIsCopy;
jfloat *writeBuf = NULL;
htri_t vl_data_class;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Dwrite_float: write buffer is NULL");
if ((vl_data_class = h5str_detect_vlen(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
/* Get size of data array */
if (ENVPTR->GetArrayLength(ENVONLY, buf) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Dread: readBuf length < 0");
}
if (isCriticalPinning) {
PIN_FLOAT_ARRAY_CRITICAL(ENVONLY, buf, writeBuf, &writeBufIsCopy,
"H5Dwrite_float: write buffer not critically pinned");
}
else {
PIN_FLOAT_ARRAY(ENVONLY, buf, writeBuf, &writeBufIsCopy, "H5Dwrite_float: write buffer not pinned");
}
if ((status = H5Dwrite((hid_t)dataset_id, (hid_t)mem_type_id, (hid_t)mem_space_id, (hid_t)file_space_id,
(hid_t)xfer_plist_id, writeBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (writeBuf) {
if ((status >= 0) && vl_data_class)
H5Treclaim(dataset_id, mem_space_id, H5P_DEFAULT, writeBuf);
if (isCriticalPinning) {
UNPIN_ARRAY_CRITICAL(ENVONLY, buf, writeBuf, (status < 0) ? JNI_ABORT : 0);
}
else {
UNPIN_FLOAT_ARRAY(ENVONLY, buf, writeBuf, (status < 0) ? JNI_ABORT : 0);
}
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Dwrite_1float */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dread_double
* Signature: (JJJJJ[DZ)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Dread_1double(JNIEnv *env, jclass clss, jlong dataset_id, jlong mem_type_id,
jlong mem_space_id, jlong file_space_id, jlong xfer_plist_id,
jdoubleArray buf, jboolean isCriticalPinning)
{
jboolean readBufIsCopy;
jdouble *readBuf = NULL;
htri_t vl_data_class;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Dread_double: read buffer is NULL");
/* Get size of data array */
if (ENVPTR->GetArrayLength(ENVONLY, buf) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Aread: readBuf length < 0");
}
if ((vl_data_class = h5str_detect_vlen(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (isCriticalPinning) {
PIN_DOUBLE_ARRAY_CRITICAL(ENVONLY, buf, readBuf, &readBufIsCopy,
"H5Dread_double: read buffer not critically pinned");
}
else {
PIN_DOUBLE_ARRAY(ENVONLY, buf, readBuf, &readBufIsCopy, "H5Dread_double: read buffer not pinned");
}
if ((status = H5Dread((hid_t)dataset_id, (hid_t)mem_type_id, (hid_t)mem_space_id, (hid_t)file_space_id,
(hid_t)xfer_plist_id, readBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (readBuf) {
if ((status >= 0) && vl_data_class)
H5Treclaim(dataset_id, mem_space_id, H5P_DEFAULT, readBuf);
if (isCriticalPinning) {
UNPIN_ARRAY_CRITICAL(ENVONLY, buf, readBuf, (status < 0) ? JNI_ABORT : 0);
}
else {
UNPIN_DOUBLE_ARRAY(ENVONLY, buf, readBuf, (status < 0) ? JNI_ABORT : 0);
}
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Dread_1double */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dwrite_double
* Signature: (JJJJJ[DZ)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Dwrite_1double(JNIEnv *env, jclass clss, jlong dataset_id, jlong mem_type_id,
jlong mem_space_id, jlong file_space_id, jlong xfer_plist_id,
jdoubleArray buf, jboolean isCriticalPinning)
{
jboolean writeBufIsCopy;
jdouble *writeBuf = NULL;
htri_t vl_data_class;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Dwrite_double: write buffer is NULL");
if (ENVPTR->GetArrayLength(ENVONLY, buf) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Dwrite_double: buf length < 0");
}
if ((vl_data_class = h5str_detect_vlen(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (isCriticalPinning) {
PIN_DOUBLE_ARRAY_CRITICAL(ENVONLY, buf, writeBuf, &writeBufIsCopy,
"H5Dwrite_double: write buffer not critically pinned");
}
else {
PIN_DOUBLE_ARRAY(ENVONLY, buf, writeBuf, &writeBufIsCopy, "H5Dwrite_double: write buffer not pinned");
}
if ((status = H5Dwrite((hid_t)dataset_id, (hid_t)mem_type_id, (hid_t)mem_space_id, (hid_t)file_space_id,
(hid_t)xfer_plist_id, writeBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (writeBuf) {
if ((status >= 0) && vl_data_class)
H5Treclaim(dataset_id, mem_space_id, H5P_DEFAULT, writeBuf);
if (isCriticalPinning) {
UNPIN_ARRAY_CRITICAL(ENVONLY, buf, writeBuf, (status < 0) ? JNI_ABORT : 0);
}
else {
UNPIN_DOUBLE_ARRAY(ENVONLY, buf, writeBuf, (status < 0) ? JNI_ABORT : 0);
}
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Dwrite_1double */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dread_string
* Signature: (JJJJJ[Ljava/lang/String;)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Dread_1string(JNIEnv *env, jclass clss, jlong dataset_id, jlong mem_type_id,
jlong mem_space_id, jlong file_space_id, jlong xfer_plist_id,
jobjectArray j_buf)
{
jstring jstr;
size_t str_len;
size_t pos;
jsize i, n;
char *c_buf = NULL;
char *cstr = NULL;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == j_buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Dread_string: read buffer is NULL");
if ((n = ENVPTR->GetArrayLength(ENVONLY, j_buf)) <= 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Dread_string: read buffer length <= 0");
}
if (!(str_len = H5Tget_size((hid_t)mem_type_id)))
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (cstr = (char *)malloc(str_len + 1)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Dread_string: memory allocation failed");
if (NULL == (c_buf = (char *)malloc((size_t)n * str_len)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Dread_string: memory allocation failed");
if ((status = H5Dread((hid_t)dataset_id, (hid_t)mem_type_id, (hid_t)mem_space_id, (hid_t)file_space_id,
(hid_t)xfer_plist_id, c_buf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
for (i = 0, pos = 0; i < n; i++) {
memcpy(cstr, c_buf + pos, str_len);
cstr[str_len] = '\0';
if (NULL == (jstr = ENVPTR->NewStringUTF(ENVONLY, cstr))) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_OUT_OF_MEMORY_ERROR(
ENVONLY, "H5Dread_string: out of memory - unable to construct string from UTF characters");
}
ENVPTR->SetObjectArrayElement(ENVONLY, j_buf, i, jstr);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
pos += str_len;
ENVPTR->DeleteLocalRef(ENVONLY, jstr);
} /* end for */
done:
if (c_buf)
free(c_buf);
if (cstr)
free(cstr);
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Dread_1string */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dwrite_string
* Signature: (JJJJJ[Ljava/lang/String;)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Dwrite_1string(JNIEnv *env, jclass clss, jlong dataset_id, jlong mem_type_id,
jlong mem_space_id, jlong file_space_id, jlong xfer_plist_id,
jobjectArray j_buf)
{
const char *utf8 = NULL;
jstring obj;
size_t i, str_len;
jsize n;
char *c_buf = NULL;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == j_buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Dwrite_string: write buffer is NULL");
if ((n = ENVPTR->GetArrayLength(ENVONLY, j_buf)) <= 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Dwrite_string: write buffer length <= 0");
}
if (!(str_len = H5Tget_size((hid_t)mem_type_id)))
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (c_buf = (char *)malloc((size_t)n * str_len)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Dwrite_string: memory allocation failed");
for (i = 0; i < (size_t)n; i++) {
if (NULL == (obj = (jstring)ENVPTR->GetObjectArrayElement(ENVONLY, (jobjectArray)j_buf, (jsize)i))) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
/*
* If the string object was NULL, skip it.
*/
memset(&c_buf[i * str_len], 0, str_len);
continue;
}
/*
* length = ENVPTR->GetStringUTFLength(ENVONLY, obj);
* CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
*/
PIN_JAVA_STRING(ENVONLY, obj, utf8, NULL, "H5Dwrite_string: string not pinned");
strncpy(&c_buf[i * str_len], utf8, str_len);
UNPIN_JAVA_STRING(ENVONLY, obj, utf8);
utf8 = NULL;
ENVPTR->DeleteLocalRef(ENVONLY, obj);
} /* end for */
if ((status = H5Dwrite((hid_t)dataset_id, (hid_t)mem_type_id, (hid_t)mem_space_id, (hid_t)file_space_id,
(hid_t)xfer_plist_id, c_buf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (utf8)
UNPIN_JAVA_STRING(ENVONLY, obj, utf8);
if (c_buf)
free(c_buf);
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Dwrite_1string */
/*
* Class: hdf_hdf5lib_H5
* Method: H5DreadVL
* Signature: (JJJJJ[java/util/ArrayList;)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5DreadVL(JNIEnv *env, jclass clss, jlong dataset_id, jlong mem_type_id,
jlong mem_space_id, jlong file_space_id, jlong xfer_plist_id, jobjectArray buf)
{
void *readBuf = NULL;
size_t typeSize;
H5T_class_t type_class;
jsize vl_array_len;
htri_t vl_data_class;
herr_t status = FAIL;
htri_t is_variable = 0;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5DreadVL: read buffer is NULL");
if ((vl_data_class = h5str_detect_vlen(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
/* Get size of data array */
if ((vl_array_len = ENVPTR->GetArrayLength(ENVONLY, buf)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5DreadVL: readBuf length < 0");
}
if ((is_variable = H5Tis_variable_str(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (!(typeSize = H5Tget_size(mem_type_id)))
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (readBuf = calloc((size_t)vl_array_len, typeSize)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5DreadVL: failed to allocate raw VL read buffer");
if ((status = H5Dread((hid_t)dataset_id, (hid_t)mem_type_id, (hid_t)mem_space_id, (hid_t)file_space_id,
(hid_t)xfer_plist_id, readBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if ((type_class = H5Tget_class((hid_t)mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
translate_rbuf(env, buf, mem_type_id, type_class, vl_array_len, readBuf);
done:
if (readBuf) {
if ((status >= 0) && vl_data_class)
H5Treclaim(dataset_id, mem_space_id, H5P_DEFAULT, readBuf);
if (is_variable) {
for (size_t i = 0; i < (size_t)vl_array_len; i++)
free(((char **)readBuf)[i]);
}
free(readBuf);
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5DreadVL */
/*
* Class: hdf_hdf5lib_H5
* Method: H5DwriteVL
* Signature: (JJJJJ[java/util/ArrayList;)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5DwriteVL(JNIEnv *env, jclass clss, jlong dataset_id, jlong mem_type_id,
jlong mem_space_id, jlong file_space_id, jlong xfer_plist_id, jobjectArray buf)
{
void *writeBuf = NULL;
size_t typeSize;
H5T_class_t type_class;
jsize vl_array_len; // Only used by vl_data_class types
htri_t vl_data_class;
herr_t status = FAIL;
htri_t is_variable = 0;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5DwriteVL: write buffer is NULL");
if ((vl_data_class = h5str_detect_vlen(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
/* Get size of data array */
if ((vl_array_len = ENVPTR->GetArrayLength(ENVONLY, buf)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5DwriteVL: write buffer length < 0");
}
if ((is_variable = H5Tis_variable_str(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (!(typeSize = H5Tget_size(mem_type_id)))
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (writeBuf = calloc((size_t)vl_array_len, typeSize)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5DwriteVL: failed to allocate raw VL write buffer");
if ((type_class = H5Tget_class((hid_t)mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
translate_wbuf(ENVONLY, buf, mem_type_id, type_class, vl_array_len, writeBuf);
if ((status = H5Dwrite((hid_t)dataset_id, (hid_t)mem_type_id, (hid_t)mem_space_id, (hid_t)file_space_id,
(hid_t)xfer_plist_id, writeBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (writeBuf) {
if ((status >= 0) && vl_data_class)
H5Treclaim(dataset_id, mem_space_id, H5P_DEFAULT, writeBuf);
if (is_variable) {
for (size_t i = 0; i < (size_t)vl_array_len; i++)
free(((char **)writeBuf)[i]);
}
free(writeBuf);
}
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5DwriteVL */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dread_VLStrings
* Signature: (JJJJJ[Ljava/lang/String;)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Dread_1VLStrings(JNIEnv *env, jclass clss, jlong dataset_id, jlong mem_type_id,
jlong mem_space_id, jlong file_space_id, jlong xfer_plist_id,
jobjectArray buf)
{
H5T_class_t type_class;
htri_t isStr = 0;
htri_t isVlenStr = 0;
htri_t isCompound = 0;
htri_t isVlen = 0;
hid_t nested_tid = H5I_INVALID_HID;
bool isComposite = false;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5DreadVLStrings: read buffer is NULL");
if ((isStr = H5Tdetect_class((hid_t)mem_type_id, H5T_STRING)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if ((type_class = H5Tget_class((hid_t)mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (type_class == H5T_COMPOUND) {
unsigned i;
int num_members;
if ((num_members = H5Tget_nmembers(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
for (i = 0; i < (unsigned)num_members; i++) {
if ((nested_tid = H5Tget_member_type((hid_t)mem_type_id, i)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if ((isCompound = H5Tdetect_class((hid_t)nested_tid, H5T_COMPOUND)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if ((isVlen = H5Tdetect_class((hid_t)nested_tid, H5T_VLEN)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
isComposite = isCompound || isVlen;
if (H5Tclose(nested_tid) < 0)
H5_LIBRARY_ERROR(ENVONLY);
nested_tid = H5I_INVALID_HID;
}
}
else if (type_class == H5T_VLEN) {
isVlenStr = 1; /* Strings created by H5Tvlen_create(H5T_C_S1) */
}
if (!isStr || isComposite || isVlenStr) {
if ((status = H5DreadVL_asstr(env, (hid_t)dataset_id, (hid_t)mem_type_id, (hid_t)mem_space_id,
(hid_t)file_space_id, (hid_t)xfer_plist_id, buf)) < 0)
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
}
else if (isStr) {
if ((status = H5DreadVL_str(env, (hid_t)dataset_id, (hid_t)mem_type_id, (hid_t)mem_space_id,
(hid_t)file_space_id, (hid_t)xfer_plist_id, buf)) < 0)
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
}
done:
if (nested_tid >= 0)
H5Tclose(nested_tid);
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Dread_1VLStrings */
/*
* Helper method to read in a buffer of variable-length strings from an HDF5
* dataset. Each C-string is converted to a Java string and set in the output
* buffer in turn.
*/
static herr_t
H5DreadVL_str(JNIEnv *env, hid_t did, hid_t tid, hid_t mem_sid, hid_t file_sid, hid_t xfer_plist_id,
jobjectArray buf)
{
jstring jstr;
jsize i, n;
char **strs = NULL;
herr_t status = FAIL;
if ((n = ENVPTR->GetArrayLength(ENVONLY, buf)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5DreadVL_str: buf length < 0");
}
if (NULL == (strs = (char **)calloc((size_t)n, sizeof(char *))))
H5_OUT_OF_MEMORY_ERROR(ENVONLY,
"H5DreadVL_str: failed to allocate variable length string read buffer");
if ((status = H5Dread(did, tid, mem_sid, file_sid, xfer_plist_id, strs)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
/*
* When repeatedly reading a dataset with a large number of strs (e.g., 1,000,000 strings),
* H5Treclaim() may crash on Windows because the Java GC will not be able to collect
* free space in time. Instead, we use "H5free_memory(strs[i])" to free individual strings
* once done.
*/
for (i = 0; i < n; i++) {
if (NULL == (jstr = ENVPTR->NewStringUTF(ENVONLY, strs[i])))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
ENVPTR->SetObjectArrayElement(ENVONLY, buf, i, jstr);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
H5free_memory(strs[i]);
strs[i] = NULL;
ENVPTR->DeleteLocalRef(ENVONLY, jstr);
} /* end for */
done:
if (strs) {
for (i = 0; i < n; i++) {
if (strs[i])
H5free_memory(strs[i]);
}
free(strs);
}
return status;
} /* end H5DreadVL_str */
/*
* Helper method to read in a buffer of variable-length (hvl_t)
* structures from an HDF5 dataset and convert each variable-length
* element's buffer into a Java string. Each string is then set
* in the output buffer in turn.
*/
static herr_t
H5DreadVL_asstr(JNIEnv *env, hid_t did, hid_t tid, hid_t mem_sid, hid_t file_sid, hid_t xfer_plist_id,
jobjectArray buf)
{
H5T_class_t tclass;
jstring jstr;
h5str_t h5str;
bool close_mem_space = false;
size_t typeSize;
size_t i;
hid_t mem_space = mem_sid;
jsize n;
void *readBuf = NULL;
herr_t status = FAIL;
memset(&h5str, 0, sizeof(h5str_t));
if (mem_space == H5S_ALL) {
mem_space = file_sid;
if (mem_space == H5S_ALL) {
/*
* Retrieve a valid dataspace for H5Treclaim().
*/
if ((mem_space = H5Dget_space(did)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
close_mem_space = true;
if (H5Sselect_all(mem_space) < 0)
H5_LIBRARY_ERROR(ENVONLY);
}
}
/* Get size of string array */
if ((n = ENVPTR->GetArrayLength(ENVONLY, buf)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5DreadVL_asstr: buf length < 0");
}
if (!(typeSize = H5Tget_size(tid)))
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (readBuf = calloc((size_t)n, typeSize)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5DreadVL_asstr: failed to allocate read buffer");
if ((status = H5Dread(did, tid, mem_sid, file_sid, xfer_plist_id, readBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
/* Allocate a decent-sized initial string */
h5str_new(&h5str, 4 * typeSize);
if (!h5str.s)
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5DreadVL_asstr: failed to allocate buffer");
if ((tclass = H5Tget_class(tid)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
/* Convert each element to a char string */
for (i = 0; i < (size_t)n; i++) {
h5str.s[0] = '\0';
if (!h5str_sprintf(ENVONLY, &h5str, did, tid, &(((char *)readBuf)[i * typeSize]), 0))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
if (NULL == (jstr = ENVPTR->NewStringUTF(ENVONLY, h5str.s)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
ENVPTR->SetObjectArrayElement(ENVONLY, buf, (jsize)i, jstr);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
ENVPTR->DeleteLocalRef(ENVONLY, jstr);
} /* end for */
done:
if (h5str.s)
h5str_free(&h5str);
if (readBuf) {
H5Treclaim(tid, mem_space, xfer_plist_id, readBuf);
free(readBuf);
}
if (close_mem_space)
H5Sclose(mem_space);
return status;
}
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dwrite_VLStrings
* Signature: (JJJJJ[Ljava/lang/String;)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Dwrite_1VLStrings(JNIEnv *env, jclass clss, jlong dataset_id, jlong mem_type_id,
jlong mem_space_id, jlong file_space_id, jlong xfer_plist_id,
jobjectArray buf)
{
H5T_class_t type_class;
htri_t isStr = 0;
htri_t isVlenStr = 0;
htri_t isCompound = 0;
htri_t isVlen = 0;
hid_t nested_tid = H5I_INVALID_HID;
bool isComposite = false;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5DwriteVLStrings: write buffer is NULL");
if ((isStr = H5Tdetect_class((hid_t)mem_type_id, H5T_STRING)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if ((type_class = H5Tget_class((hid_t)mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (type_class == H5T_COMPOUND) {
unsigned i;
int num_members;
if ((num_members = H5Tget_nmembers(mem_type_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
for (i = 0; i < (unsigned)num_members; i++) {
if ((nested_tid = H5Tget_member_type((hid_t)mem_type_id, i)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if ((isCompound = H5Tdetect_class((hid_t)nested_tid, H5T_COMPOUND)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if ((isVlen = H5Tdetect_class((hid_t)nested_tid, H5T_VLEN)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
isComposite = isCompound || isVlen;
if (H5Tclose(nested_tid) < 0)
H5_LIBRARY_ERROR(ENVONLY);
nested_tid = H5I_INVALID_HID;
}
}
else if (type_class == H5T_VLEN) {
isVlenStr = 1; /* Strings created by H5Tvlen_create(H5T_C_S1) */
}
if (!isStr || isComposite || isVlenStr) {
if ((status = H5DwriteVL_asstr(env, (hid_t)dataset_id, (hid_t)mem_type_id, (hid_t)mem_space_id,
(hid_t)file_space_id, (hid_t)xfer_plist_id, buf)) < 0)
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
}
else if (isStr) {
if ((status = H5DwriteVL_str(env, (hid_t)dataset_id, (hid_t)mem_type_id, (hid_t)mem_space_id,
(hid_t)file_space_id, (hid_t)xfer_plist_id, buf)) < 0)
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
}
done:
if (nested_tid >= 0)
H5Tclose(nested_tid);
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Dwrite_1VLStrings */
/*
* Helper method to convert an array of Java strings into a buffer of C-strings.
* The buffer of C-strings is then written to the HDF5 dataset specified.
*/
static herr_t
H5DwriteVL_str(JNIEnv *env, hid_t dataset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id,
hid_t xfer_plist_id, jobjectArray buf)
{
const char *utf8 = NULL;
jstring obj;
jsize size;
jint i;
char **writeBuf = NULL;
herr_t status = FAIL;
if ((size = ENVPTR->GetArrayLength(ENVONLY, (jarray)buf)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5DwriteVL_str: buf length < 0");
}
if (NULL == (writeBuf = (char **)calloc((size_t)size + 1, sizeof(char *))))
H5_OUT_OF_MEMORY_ERROR(ENVONLY,
"H5DwriteVL_str: failed to allocate variable length string write buffer");
for (i = 0; i < size; ++i) {
jsize length;
if (NULL == (obj = (jstring)ENVPTR->GetObjectArrayElement(ENVONLY, (jobjectArray)buf, i))) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
/*
* If the string object was NULL, skip it.
*/
writeBuf[i] = NULL;
continue;
}
length = ENVPTR->GetStringUTFLength(ENVONLY, obj);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
PIN_JAVA_STRING(ENVONLY, obj, utf8, NULL, "H5DwriteVL_str: string not pinned");
if (NULL == (writeBuf[i] = (char *)malloc((size_t)length + 1)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5DwriteVL_str: failed to allocate string buffer");
strncpy(writeBuf[i], utf8, (size_t)length + 1);
writeBuf[i][length] = '\0';
UNPIN_JAVA_STRING(ENVONLY, obj, utf8);
utf8 = NULL;
ENVPTR->DeleteLocalRef(ENVONLY, obj);
} /* end for (i = 0; i < size; ++i) */
if ((status = H5Dwrite(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, writeBuf)) <
0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (utf8)
UNPIN_JAVA_STRING(ENVONLY, obj, utf8);
if (writeBuf) {
for (i = 0; i < size; i++) {
if (writeBuf[i])
free(writeBuf[i]);
}
free(writeBuf);
}
return status;
} /* end H5DwriteVL_str */
/*
* Helper method to convert an array of Java strings into a buffer of
* variable-length (hvl_t) elements. The buffer of variable-length
* elements is then written to the HDF5 dataset.
*/
static herr_t
H5DwriteVL_asstr(JNIEnv *env, hid_t did, hid_t tid, hid_t mem_sid, hid_t file_sid, hid_t xfer_plist_id,
jobjectArray buf)
{
const char *utf8 = NULL;
jstring jstr = NULL;
bool close_mem_space = false;
size_t typeSize;
size_t i;
hid_t mem_space = mem_sid;
jsize n;
void *writeBuf = NULL;
herr_t status = FAIL;
if (mem_space == H5S_ALL) {
mem_space = file_sid;
if (mem_space == H5S_ALL) {
/*
* Retrieve a valid dataspace for H5Treclaim().
*/
if ((mem_space = H5Dget_space(did)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
close_mem_space = true;
if (H5Sselect_all(mem_space) < 0)
H5_LIBRARY_ERROR(ENVONLY);
}
}
if ((n = ENVPTR->GetArrayLength(ENVONLY, buf)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5DwriteVL_asstr: buf length < 0");
}
if (!(typeSize = H5Tget_size(tid)))
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (writeBuf = calloc((size_t)n, typeSize)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5AwriteVL_asstr: failed to allocate write buffer");
for (i = 0; i < (size_t)n; ++i) {
if (NULL == (jstr = (jstring)ENVPTR->GetObjectArrayElement(ENVONLY, (jobjectArray)buf, (jsize)i))) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
/*
* If the string object was NULL, skip it.
*/
memset(&(((char *)writeBuf)[i * typeSize]), 0, typeSize);
continue;
}
PIN_JAVA_STRING(ENVONLY, jstr, utf8, NULL, "H5DwriteVL_asstr: failed to pin string buffer");
/*
* Make a copy of the string since h5str_convert uses strtok.
*/
char *utf8_copy = NULL;
jsize length = ENVPTR->GetStringUTFLength(ENVONLY, jstr);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
if (NULL == (utf8_copy = HDstrndup(utf8, (size_t)length)))
H5_LIBRARY_ERROR(ENVONLY);
if (!h5str_convert(ENVONLY, &utf8_copy, did, tid, &(((char *)writeBuf)[i * typeSize]), 0))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
free(utf8_copy);
UNPIN_JAVA_STRING(ENVONLY, jstr, utf8);
utf8 = NULL;
ENVPTR->DeleteLocalRef(ENVONLY, jstr);
} /* end for (i = 0; i < size; ++i) */
if ((status = H5Dwrite(did, tid, mem_sid, file_sid, xfer_plist_id, writeBuf)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (utf8)
UNPIN_JAVA_STRING(ENVONLY, jstr, utf8);
if (writeBuf) {
H5Treclaim(tid, mem_space, xfer_plist_id, writeBuf);
free(writeBuf);
}
if (close_mem_space)
H5Sclose(mem_space);
return status;
} /* end H5DwriteVL_asstr */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dread_reg_ref
* Signature: (JJJJJ[Ljava/lang/String;)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Dread_1reg_1ref(JNIEnv *env, jclass clss, jlong dataset_id, jlong mem_type_id,
jlong mem_space_id, jlong file_space_id, jlong xfer_plist_id,
jobjectArray buf)
{
H5R_ref_t *ref_data = NULL;
h5str_t h5str;
jstring jstr;
jsize i, n;
herr_t status = FAIL;
UNUSED(clss);
memset(&h5str, 0, sizeof(h5str_t));
if ((n = ENVPTR->GetArrayLength(ENVONLY, buf)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Dread_reg_ref: buf length < 0");
}
if (NULL == (ref_data = (H5R_ref_t *)calloc(1, (size_t)n * sizeof(H5R_ref_t))))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Dread_reg_ref: failed to allocate read buffer");
if ((status = H5Dread((hid_t)dataset_id, (hid_t)mem_type_id, (hid_t)mem_space_id, (hid_t)file_space_id,
xfer_plist_id, ref_data)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
h5str_new(&h5str, 1024);
if (!h5str.s)
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Dread_reg_ref: failed to allocate buffer");
for (i = 0; i < n; i++) {
h5str.s[0] = '\0';
if (!h5str_sprintf(ENVONLY, &h5str, (hid_t)dataset_id, (hid_t)mem_type_id, (void *)&ref_data[i], 0))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
if (NULL == (jstr = ENVPTR->NewStringUTF(ENVONLY, h5str.s)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
ENVPTR->SetObjectArrayElement(ENVONLY, buf, i, jstr);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
ENVPTR->DeleteLocalRef(ENVONLY, jstr);
} /* end for */
done:
if (h5str.s)
h5str_free(&h5str);
if (ref_data)
free(ref_data);
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Dread_1reg_1ref */
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Dcreate2
* Signature: (JLjava/lang/String;JJJJJ)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Dcreate2(JNIEnv *env, jclass clss, jlong loc_id, jstring name, jlong type_id,
jlong space_id, jlong link_plist_id, jlong create_plist_id,
jlong access_plist_id)
{
const char *dsetName = NULL;
hid_t dset_id = H5I_INVALID_HID;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Dcreate2: dataset name is NULL");
PIN_JAVA_STRING(ENVONLY, name, dsetName, NULL, "H5Dcreate2: dataset name not pinned");
if ((dset_id = H5Dcreate2((hid_t)loc_id, dsetName, (hid_t)type_id, (hid_t)space_id, (hid_t)link_plist_id,
(hid_t)create_plist_id, (hid_t)access_plist_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (dsetName)
UNPIN_JAVA_STRING(ENVONLY, name, dsetName);
return (jlong)dset_id;
} /* end Java_hdf_hdf5lib_H5__1H5Dcreate2 */
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Dopen2
* Signature: (JLjava/lang/String;J)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Dopen2(JNIEnv *env, jclass clss, jlong loc_id, jstring name, jlong access_plist)
{
const char *dsetName = NULL;
hid_t dset_id = H5I_INVALID_HID;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Dopen2: dataset name is NULL");
PIN_JAVA_STRING(ENVONLY, name, dsetName, NULL, "H5Dopen2: dataset name not pinned");
if ((dset_id = H5Dopen2((hid_t)loc_id, dsetName, (hid_t)access_plist)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (dsetName)
UNPIN_JAVA_STRING(ENVONLY, name, dsetName);
return (jlong)dset_id;
} /* end Java_hdf_hdf5lib_H5__1H5Dopen2 */
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Dcreate_anon
* Signature: (JJJJJ)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Dcreate_1anon(JNIEnv *env, jclass clss, jlong loc_id, jlong type_id, jlong space_id,
jlong dcpl_id, jlong dapl_id)
{
hid_t dset_id = H5I_INVALID_HID;
UNUSED(clss);
if ((dset_id = H5Dcreate_anon((hid_t)loc_id, (hid_t)type_id, (hid_t)space_id, (hid_t)dcpl_id,
(hid_t)dapl_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jlong)dset_id;
} /* end Java_hdf_hdf5lib_H5__1H5Dcreate_1anon */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dget_space_status
* Signature: (J)I;
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Dget_1space_1status(JNIEnv *env, jclass clss, jlong loc_id)
{
H5D_space_status_t space_status = H5D_SPACE_STATUS_ERROR;
UNUSED(clss);
if (H5Dget_space_status((hid_t)loc_id, &space_status) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jint)space_status;
} /* end Java_hdf_hdf5lib_H5_H5Dget_1space_1status */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dget_access_plist
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5_H5Dget_1access_1plist(JNIEnv *env, jclass clss, jlong loc_id)
{
hid_t retVal = H5I_INVALID_HID;
UNUSED(clss);
if ((retVal = H5Dget_access_plist((hid_t)loc_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jlong)retVal;
} /* end Java_hdf_hdf5lib_H5_H5Dget_1access_1plist */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dget_offset
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5_H5Dget_1offset(JNIEnv *env, jclass clss, jlong loc_id)
{
haddr_t offset = HADDR_UNDEF;
UNUSED(clss);
if (HADDR_UNDEF == (offset = H5Dget_offset((hid_t)loc_id)))
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jlong)offset;
} /* end Java_hdf_hdf5lib_H5_H5Dget_1offset */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dvlen_get_buf_size
* Signature: (JJJ)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5_H5Dvlen_1get_1buf_1size(JNIEnv *env, jclass clss, jlong dataset_id, jlong type_id,
jlong space_id)
{
hsize_t sz = 0;
UNUSED(clss);
if (H5Dvlen_get_buf_size((hid_t)dataset_id, (hid_t)type_id, (hid_t)space_id, &sz) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jlong)sz;
} /* end Java_hdf_hdf5lib_H5_H5Dvlen_1get_1buf_1size_1long */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dfill
* Signature: ([BJ[BJJ)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Dfill(JNIEnv *env, jclass clss, jbyteArray fill, jlong fill_type_id, jbyteArray buf,
jlong buf_type_id, jlong space_id)
{
jboolean isCopy1;
jboolean isCopy2;
herr_t status = FAIL;
jbyte *fillP = NULL;
jbyte *buffP = NULL;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Dfill: buffer is NULL");
PIN_BYTE_ARRAY(ENVONLY, buf, buffP, &isCopy2, "H5Dfill: buffer not pinned");
if (fill) {
PIN_BYTE_ARRAY(ENVONLY, fill, fillP, &isCopy1, "H5Dfill: fill buffer not pinned");
}
if ((status = H5Dfill((const void *)fillP, (hid_t)fill_type_id, (void *)buffP, (hid_t)buf_type_id,
(hid_t)space_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (fillP) {
UNPIN_BYTE_ARRAY(ENVONLY, fill, fillP, JNI_ABORT);
fillP = NULL;
}
done:
if (fillP)
UNPIN_BYTE_ARRAY(ENVONLY, fill, fillP, JNI_ABORT);
if (buffP)
UNPIN_BYTE_ARRAY(ENVONLY, buf, buffP, (status < 0) ? JNI_ABORT : 0);
} /* end Java_hdf_hdf5lib_H5_H5Dfill */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dset_extent
* Signature: (J[J)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Dset_1extent(JNIEnv *env, jclass clss, jlong loc_id, jlongArray buf)
{
jboolean isCopy;
hsize_t *dims = NULL;
herr_t status;
jsize rank;
jlong *dimsBuf = NULL;
int i = 0;
UNUSED(clss);
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Dset_extent: buffer is NULL");
if ((rank = ENVPTR->GetArrayLength(ENVONLY, buf)) <= 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Dset_extent: buf length <= 0");
}
PIN_LONG_ARRAY(ENVONLY, buf, dimsBuf, &isCopy, "H5Dset_extent: buffer not pinned");
if (NULL == (dims = (hsize_t *)malloc((size_t)rank * sizeof(hsize_t))))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Dset_extent: failed to allocate dataset dimension buffer");
for (i = 0; i < rank; i++)
dims[i] = (hsize_t)dimsBuf[i];
if ((status = H5Dset_extent((hid_t)loc_id, (hsize_t *)dims)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (dims)
free(dims);
if (dimsBuf)
UNPIN_LONG_ARRAY(ENVONLY, buf, dimsBuf, JNI_ABORT);
} /* end Java_hdf_hdf5lib_H5_H5Dset_1extent */
static herr_t
H5D_iterate_cb(void *elem, hid_t elem_id, unsigned ndim, const hsize_t *point, void *cb_data)
{
cb_wrapper *wrapper = (cb_wrapper *)cb_data;
jbyteArray elemArray;
jlongArray pointArray;
jmethodID mid;
jobject visit_callback = wrapper->visit_callback;
jclass cls;
JNIEnv *cbenv = NULL;
jint status = FAIL;
jsize size;
void *op_data = (void *)wrapper->op_data;
if (JVMPTR->AttachCurrentThread(JVMPAR, (void **)&cbenv, NULL) < 0) {
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_TRUE);
H5_JNI_FATAL_ERROR(CBENVONLY, "H5D_iterate_cb: failed to attach current thread to JVM");
}
if (NULL == (cls = CBENVPTR->GetObjectClass(CBENVONLY, visit_callback)))
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_FALSE);
if (NULL == (mid = CBENVPTR->GetMethodID(CBENVONLY, cls, "callback",
"([BJI[JLhdf/hdf5lib/callbacks/H5D_iterate_t;)I")))
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_FALSE);
if (NULL == elem)
H5_NULL_ARGUMENT_ERROR(CBENVONLY, "H5D_iterate_cb: element buffer is NULL");
if (NULL == point)
H5_NULL_ARGUMENT_ERROR(CBENVONLY, "H5D_iterate_cb: point is NULL");
if (!(size = (jsize)H5Tget_size(elem_id)))
H5_LIBRARY_ERROR(CBENVONLY);
if (NULL == (elemArray = CBENVPTR->NewByteArray(CBENVONLY, size)))
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_FALSE);
CBENVPTR->SetByteArrayRegion(CBENVONLY, elemArray, 0, size, (jbyte *)elem);
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_FALSE);
if (NULL == (pointArray = CBENVPTR->NewLongArray(CBENVONLY, 2)))
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_FALSE);
CBENVPTR->SetLongArrayRegion(CBENVONLY, pointArray, 0, 2, (const jlong *)point);
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_FALSE);
status = CBENVPTR->CallIntMethod(CBENVONLY, visit_callback, mid, (void *)elemArray, elem_id, ndim,
pointArray, op_data);
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_FALSE);
CBENVPTR->GetByteArrayRegion(CBENVONLY, elemArray, 0, size, (jbyte *)elem);
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_FALSE);
done:
if (cbenv)
JVMPTR->DetachCurrentThread(JVMPAR);
return (herr_t)status;
} /* end H5D_iterate_cb */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Diterate
* Signature: ([BJJLjava/lang/Object;Ljava/lang/Object;)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Diterate(JNIEnv *env, jclass clss, jbyteArray buf, jlong buf_type, jlong space,
jobject callback_op, jobject op_data)
{
cb_wrapper wrapper = {callback_op, op_data};
jboolean isCopy;
jbyte *iterBuf = NULL;
herr_t status = FAIL;
UNUSED(clss);
ENVPTR->GetJavaVM(ENVONLY, &jvm);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
if (NULL == op_data)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Diterate: op_data is NULL");
if (NULL == callback_op)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Diterate: callback_op is NULL");
if (NULL == buf)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Diterate: buffer is NULL");
PIN_BYTE_ARRAY(ENVONLY, buf, iterBuf, &isCopy, "H5Diterate: buffer not pinned");
if ((status = H5Diterate((void *)iterBuf, (hid_t)buf_type, (hid_t)space, (H5D_operator_t)H5D_iterate_cb,
(void *)&wrapper)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (iterBuf)
UNPIN_BYTE_ARRAY(ENVONLY, buf, iterBuf,
(status < 0) ? (JNI_ABORT) : ((isCopy == JNI_TRUE) ? 0 : JNI_ABORT));
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Diterate */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dflush
* Signature: (J)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Dflush(JNIEnv *env, jclass clss, jlong loc_id)
{
UNUSED(clss);
if (H5Dflush((hid_t)loc_id) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return;
}
/*
* Class: hdf_hdf5lib_H5
* Method: H5Drefresh
* Signature: (J)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Drefresh(JNIEnv *env, jclass clss, jlong loc_id)
{
UNUSED(clss);
if (H5Drefresh((hid_t)loc_id) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return;
}
#ifdef __cplusplus
} /* end extern "C" */
#endif /* __cplusplus */
+325
View File
@@ -0,0 +1,325 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <jni.h>
/* Header for class hdf_hdf5lib_H5_H5D */
#ifndef Included_hdf_hdf5lib_H5_H5D
#define Included_hdf_hdf5lib_H5_H5D
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Dcreate
* Signature: (JLjava/lang/String;JJJ)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Dcreate(JNIEnv *, jclass, jlong, jstring, jlong, jlong,
jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Dopen
* Signature: (JLjava/lang/String;)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Dopen(JNIEnv *, jclass, jlong, jstring);
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Dget_space
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Dget_1space(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Dget_type
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Dget_1type(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Dget_create_plist
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Dget_1create_1plist(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dread
* Signature: (JJJJJ[BZ)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Dread(JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong,
jbyteArray, jboolean);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dwrite
* Signature: (JJJJJ[BZ)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Dwrite(JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong,
jbyteArray, jboolean);
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Dclose
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5__1H5Dclose(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dget_storage_size
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Dget_1storage_1size(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dvlen_reclaim
* Signature: (JJJ[B)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Dvlen_1reclaim(JNIEnv *, jclass, jlong, jlong, jlong,
jbyteArray);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dread_short
* Signature: (JJJJJ[SZ)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Dread_1short(JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong,
jshortArray, jboolean);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dwrite_short
* Signature: (JJJJJ[SZ)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Dwrite_1short(JNIEnv *, jclass, jlong, jlong, jlong, jlong,
jlong, jshortArray, jboolean);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dread_int
* Signature: (JJJJJ[IZ)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Dread_1int(JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong,
jintArray, jboolean);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dwrite_int
* Signature: (JJJJJ[IZ)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Dwrite_1int(JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong,
jintArray, jboolean);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dread_long
* Signature: (JJJJJ[JZ)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Dread_1long(JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong,
jlongArray, jboolean);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dwrite_long
* Signature: (JJJJJ[JZ)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Dwrite_1long(JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong,
jlongArray, jboolean);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dread_float
* Signature: (JJJJJ[FZ)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Dread_1float(JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong,
jfloatArray, jboolean);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dwrite_float
* Signature: (JJJJJ[FZ)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Dwrite_1float(JNIEnv *, jclass, jlong, jlong, jlong, jlong,
jlong, jfloatArray, jboolean);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dread_double
* Signature: (JJJJJ[DZ)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Dread_1double(JNIEnv *, jclass, jlong, jlong, jlong, jlong,
jlong, jdoubleArray, jboolean);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dwrite_double
* Signature: (JJJJJ[DZ)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Dwrite_1double(JNIEnv *, jclass, jlong, jlong, jlong, jlong,
jlong, jdoubleArray, jboolean);
/*
* Class: hdf_hdf5lib_H5
* Method: H5DreadVL
* Signature: (JJJJJ[Ljava/util/ArrayList;)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5DreadVL(JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong,
jobjectArray);
/*
* Class: hdf_hdf5lib_H5
* Method: H5DwriteVL
* Signature: (JJJJJ[Ljava/util/ArrayList;)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5DwriteVL(JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong,
jobjectArray);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dread_string
* Signature: (JJJJJ[Ljava/lang/String;)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Dread_1string(JNIEnv *, jclass, jlong, jlong, jlong, jlong,
jlong, jobjectArray);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dwrite_string
* Signature: (JJJJJ[Ljava/lang/String;)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Dwrite_1string(JNIEnv *, jclass, jlong, jlong, jlong, jlong,
jlong, jobjectArray);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dread_VLStrings
* Signature: (JJJJJ[Ljava/lang/String;)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Dread_1VLStrings(JNIEnv *, jclass, jlong, jlong, jlong, jlong,
jlong, jobjectArray);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dwrite_VLStrings
* Signature: (JJJJJ[B)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Dwrite_1VLStrings(JNIEnv *, jclass, jlong, jlong, jlong, jlong,
jlong, jobjectArray);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dread_reg_ref
* Signature: (JJJJJ[Ljava/lang/String;)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Dread_1reg_1ref(JNIEnv *, jclass, jlong, jlong, jlong, jlong,
jlong, jobjectArray);
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Dcreate2
* Signature: (JLjava/lang/String;JJJJJ)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Dcreate2(JNIEnv *, jclass, jlong, jstring, jlong, jlong,
jlong, jlong, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Dopen2
* Signature: (JLjava/lang/String;J)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Dopen2(JNIEnv *, jclass, jlong, jstring, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Dcreate_anon
* Signature: (JJJJJ)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Dcreate_1anon(JNIEnv *, jclass, jlong, jlong, jlong, jlong,
jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dget_space_status
* Signature: (J)I;
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Dget_1space_1status(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dget_access_plist
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Dget_1access_1plist(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dget_offset
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Dget_1offset(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dvlen_get_buf_size
* Signature: (JJJ)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Dvlen_1get_1buf_1size(JNIEnv *, jclass, jlong, jlong, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dfill
* Signature: ([BJ[BJJ)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Dfill(JNIEnv *, jclass, jbyteArray, jlong, jbyteArray, jlong,
jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dset_extent
* Signature: (J[J)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Dset_1extent(JNIEnv *, jclass, jlong, jlongArray);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Diterate
* Signature: ([BJJLjava/lang/Object;Ljava/lang/Object;)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Diterate(JNIEnv *, jclass, jbyteArray, jlong, jlong, jobject,
jobject);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Dflush
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Dflush(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Drefresh
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Drefresh(JNIEnv *, jclass, jlong);
#ifdef __cplusplus
} /* end extern "C" */
#endif /* __cplusplus */
#endif /* Included_hdf_hdf5lib_H5_H5D */
+581
View File
@@ -0,0 +1,581 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*
* This code is the C-interface called by Java programs to access the
* general library functions of the HDF5 library.
*
* Each routine wraps a single HDF entry point, generally with the
* analogous arguments and return codes.
*
*/
#include <jni.h>
#include <stdlib.h>
#include "hdf5.h"
#include "h5jni.h"
#include "h5eImp.h"
/*
* Pointer to the JNI's Virtual Machine; used for callback functions.
*/
extern JavaVM *jvm;
typedef struct _cb_wrapper {
jobject visit_callback;
jobject op_data;
} cb_wrapper;
/********************/
/* Local Prototypes */
/********************/
static herr_t H5E_walk_cb(int nindx, const H5E_error2_t *info, void *cb_data);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Eauto_is_v2
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
Java_hdf_hdf5lib_H5_H5Eauto_1is_1v2(JNIEnv *env, jclass clss, jlong stk_id)
{
unsigned int is_stack = 0;
UNUSED(clss);
if (stk_id < 0)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eauto_is_v2: invalid stack ID");
if (H5Eauto_is_v2((hid_t)stk_id, &is_stack) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jboolean)is_stack;
} /* end Java_hdf_hdf5lib_H5_H5Eauto_1is_1v2 */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Eregister_class
* Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5_H5Eregister_1class(JNIEnv *env, jclass clss, jstring cls_name, jstring lib_name,
jstring version)
{
const char *the_cls_name = NULL;
const char *the_lib_name = NULL;
const char *the_version = NULL;
hid_t ret_val = H5I_INVALID_HID;
UNUSED(clss);
if (NULL == cls_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Eregister_class: class name is NULL");
if (NULL == lib_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Eregister_class: lib name is NULL");
if (NULL == version)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Eregister_class: version string is NULL");
PIN_JAVA_STRING(ENVONLY, cls_name, the_cls_name, NULL, "H5Eregister_class: class name not pinned");
PIN_JAVA_STRING(ENVONLY, lib_name, the_lib_name, NULL, "H5Eregister_class: lib name not pinned");
PIN_JAVA_STRING(ENVONLY, version, the_version, NULL, "H5Eregister_class: version string not pinned");
if ((ret_val = H5Eregister_class(the_cls_name, the_lib_name, the_version)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (the_version)
UNPIN_JAVA_STRING(ENVONLY, version, the_version);
if (the_lib_name)
UNPIN_JAVA_STRING(ENVONLY, lib_name, the_lib_name);
if (the_cls_name)
UNPIN_JAVA_STRING(ENVONLY, cls_name, the_cls_name);
return (jlong)ret_val;
} /* end Java_hdf_hdf5lib_H5_H5Eregister_1class */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Eunregister_class
* Signature: (J)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Eunregister_1class(JNIEnv *env, jclass clss, jlong cls_id)
{
UNUSED(clss);
if (cls_id < 0)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eunregister_class: invalid error class ID");
if (H5Eunregister_class((hid_t)cls_id) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return;
} /* end Java_hdf_hdf5lib_H5_H5Eunregister_1class */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Eclose_msg
* Signature: (J)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Eclose_1msg(JNIEnv *env, jclass clss, jlong err_id)
{
UNUSED(clss);
if (err_id < 0)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eclose_msg: invalid error message ID");
if (H5Eclose_msg((hid_t)err_id) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return;
} /* end Java_hdf_hdf5lib_H5_H5Eclose_1msg */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Ecreate_msg
* Signature: (JILjava/lang/String;)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5_H5Ecreate_1msg(JNIEnv *env, jclass clss, jlong err_id, jint msg_type, jstring err_msg)
{
H5E_type_t error_msg_type = (H5E_type_t)msg_type;
const char *the_err_msg = NULL;
hid_t ret_val = H5I_INVALID_HID;
UNUSED(clss);
if (err_id < 0)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Ecreate_msg: invalid error class ID");
if (NULL == err_msg)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Ecreate_msg: error message string is NULL");
PIN_JAVA_STRING(ENVONLY, err_msg, the_err_msg, NULL, "H5Ecreate_msg: error message string not pinned");
if ((ret_val = H5Ecreate_msg((hid_t)err_id, error_msg_type, the_err_msg)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (the_err_msg)
UNPIN_JAVA_STRING(ENVONLY, err_msg, the_err_msg);
return (jlong)ret_val;
} /* end Java_hdf_hdf5lib_H5_H5Ecreate_1msg */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Ecreate_stack
* Signature: ()J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5_H5Ecreate_1stack(JNIEnv *env, jclass clss)
{
hid_t ret_val = H5I_INVALID_HID;
UNUSED(clss);
if ((ret_val = H5Ecreate_stack()) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jlong)ret_val;
} /* end Java_hdf_hdf5lib_H5_H5Ecreate_1stack */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Eget_current_stack
* Signature: ()J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5_H5Eget_1current_1stack(JNIEnv *env, jclass clss)
{
hid_t ret_val = H5I_INVALID_HID;
UNUSED(clss);
if ((ret_val = H5Eget_current_stack()) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jlong)ret_val;
} /* end Java_hdf_hdf5lib_H5_H5Eget_1current_1stack */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Eclose_stack
* Signature: (J)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Eclose_1stack(JNIEnv *env, jclass clss, jlong stk_id)
{
UNUSED(clss);
if (stk_id < 0)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eclose_stack: invalid error stack ID");
if (H5Eclose_stack((hid_t)stk_id) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return;
} /* end Java_hdf_hdf5lib_H5_H5Eclose_1stack */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Eprint2
* Signature: (JLjava/lang/Object;)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Eprint2(JNIEnv *env, jclass clss, jlong stk_id, jobject stream_obj)
{
herr_t ret_val = FAIL;
UNUSED(clss);
if (stk_id < 0)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eprint2: invalid error stack ID");
if (!stream_obj) {
if ((ret_val = H5Eprint2((hid_t)stk_id, stdout)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
}
else {
if ((ret_val = H5Eprint2((hid_t)stk_id, (FILE *)stream_obj)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
}
done:
return;
} /* end Java_hdf_hdf5lib_H5_H5Eprint2 */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Eget_class_name
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
Java_hdf_hdf5lib_H5_H5Eget_1class_1name(JNIEnv *env, jclass clss, jlong cls_id)
{
jstring str = NULL;
ssize_t buf_size;
char *namePtr = NULL;
UNUSED(clss);
if (cls_id < 0)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eget_class_name: invalid error class ID");
/* Get the length of the name */
if ((buf_size = H5Eget_class_name((hid_t)cls_id, NULL, 0)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (!buf_size)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eget_class_name: no class name");
if (NULL == (namePtr = (char *)malloc(sizeof(char) * (size_t)buf_size + 1)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Eget_class_name: malloc failed");
if ((H5Eget_class_name((hid_t)cls_id, (char *)namePtr, (size_t)buf_size + 1)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
namePtr[buf_size] = '\0';
if (NULL == (str = ENVPTR->NewStringUTF(ENVONLY, namePtr)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
done:
if (namePtr)
free(namePtr);
return str;
} /* end Java_hdf_hdf5lib_H5_H5Eget_1class_1name */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Eset_current_stack
* Signature: (J)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Eset_1current_1stack(JNIEnv *env, jclass clss, jlong stk_id)
{
UNUSED(clss);
if (stk_id < 0)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eset_current_stack: invalid error stack ID");
if (H5Eset_current_stack((hid_t)stk_id) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return;
} /* end Java_hdf_hdf5lib_H5_H5Eset_1current_1stack */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Epop
* Signature: (JJ)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Epop(JNIEnv *env, jclass clss, jlong stk_id, jlong count)
{
UNUSED(clss);
if (stk_id < 0)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Epop: invalid error stack ID");
if (H5Epop((hid_t)stk_id, (size_t)count) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return;
} /* end Java_hdf_hdf5lib_H5_H5Epop */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Epush2
* Signature: (JLjava/lang/String;Ljava/lang/String;IJJJLjava/lang/String;)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Epush2(JNIEnv *env, jclass clss, jlong stk_id, jstring filename, jstring funcname,
jint linenumber, jlong class_id, jlong major_id, jlong minor_id,
jstring err_desc)
{
const char *fName = NULL;
const char *fncName = NULL;
const char *errMsg = NULL;
herr_t ret_val = FAIL;
UNUSED(clss);
if (stk_id < 0)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Epush2: invalid error stack ID");
if (class_id < 0)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Epush2: invalid error class ID");
if (major_id < 0)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Epush2: invalid major error class ID");
if (minor_id < 0)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Epush2: invalid minor error class ID");
if (NULL == filename)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Epush2: filename is NULL");
if (NULL == funcname)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Epush2: function name is NULL");
if (NULL == err_desc)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Epush2: error message is NULL");
PIN_JAVA_STRING(ENVONLY, filename, fName, NULL, "H5Epush2: filename not pinned");
PIN_JAVA_STRING(ENVONLY, funcname, fncName, NULL, "H5Epush2: function name not pinned");
PIN_JAVA_STRING(ENVONLY, err_desc, errMsg, NULL, "H5Epush2: error message not pinned");
if ((ret_val = H5Epush2((hid_t)stk_id, fName, fncName, (unsigned)linenumber, (hid_t)class_id,
(hid_t)major_id, (hid_t)minor_id, errMsg)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (errMsg)
UNPIN_JAVA_STRING(ENVONLY, err_desc, errMsg);
if (fncName)
UNPIN_JAVA_STRING(ENVONLY, funcname, fncName);
if (fName)
UNPIN_JAVA_STRING(ENVONLY, filename, fName);
} /* end Java_hdf_hdf5lib_H5_H5Epush2 */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Eclear2
* Signature: (J)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Eclear2(JNIEnv *env, jclass clss, jlong stk_id)
{
UNUSED(clss);
if (stk_id < 0)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eclear2: invalid error stack ID");
if (H5Eclear2((hid_t)stk_id) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return;
} /* end Java_hdf_hdf5lib_H5_H5Eclear2 */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Eget_msg
* Signature: (J[I)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
Java_hdf_hdf5lib_H5_H5Eget_1msg(JNIEnv *env, jclass clss, jlong msg_id, jintArray error_msg_type_list)
{
H5E_type_t error_msg_type;
jstring str = NULL;
ssize_t buf_size;
jint *theArray = NULL;
char *namePtr = NULL;
UNUSED(clss);
if (msg_id < 0)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eget_msg: invalid error message ID");
if (NULL == error_msg_type_list)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Eget_msg: error_msg_type_list is NULL");
/* Get the length of the name */
if ((buf_size = H5Eget_msg((hid_t)msg_id, NULL, NULL, 0)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (!buf_size)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eget_msg: invalid message");
if (NULL == (namePtr = (char *)malloc(sizeof(char) * (size_t)buf_size + 1)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Eget_msg: malloc failed");
PIN_INT_ARRAY(ENVONLY, error_msg_type_list, theArray, NULL, "H5Eget_msg: error_msg_type_list not pinned");
if ((H5Eget_msg((hid_t)msg_id, &error_msg_type, (char *)namePtr, (size_t)buf_size + 1)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
namePtr[buf_size] = '\0';
theArray[0] = (jint)error_msg_type;
if (NULL == (str = ENVPTR->NewStringUTF(ENVONLY, namePtr)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
done:
if (theArray)
UNPIN_INT_ARRAY(ENVONLY, error_msg_type_list, theArray, 0);
if (namePtr)
free(namePtr);
return str;
} /* end Java_hdf_hdf5lib_H5_H5Eget_1msg */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Eget_num
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5_H5Eget_1num(JNIEnv *env, jclass clss, jlong stk_id)
{
ssize_t ret_val = -1;
UNUSED(clss);
if (stk_id < 0)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Eget_num: invalid error stack ID");
if ((ret_val = H5Eget_num((hid_t)stk_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jlong)ret_val;
} /* end Java_hdf_hdf5lib_H5_H5Eget_1num */
static herr_t
H5E_walk_cb(int nindx, const H5E_error2_t *info, void *cb_data)
{
cb_wrapper *wrapper = (cb_wrapper *)cb_data;
jmethodID mid;
jobject visit_callback = wrapper->visit_callback;
jstring str1, str2, str3;
jobject cb_info_t = NULL;
jvalue args[7];
JNIEnv *cbenv = NULL;
jclass cbcls;
void *op_data = (void *)wrapper->op_data;
jint status = FAIL;
if (JVMPTR->AttachCurrentThread(JVMPAR, (void **)&cbenv, NULL) < 0) {
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_TRUE);
H5_JNI_FATAL_ERROR(CBENVONLY, "H5E_walk_cb: failed to attach current thread to JVM");
}
if (NULL == (cbcls = CBENVPTR->GetObjectClass(CBENVONLY, visit_callback)))
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_FALSE);
if (NULL == (mid = CBENVPTR->GetMethodID(
CBENVONLY, cbcls, "callback",
"(ILhdf/hdf5lib/structs/H5E_error2_t;Lhdf/hdf5lib/callbacks/H5E_walk_t;)I")))
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_FALSE);
args[0].j = info->cls_id;
args[1].j = info->maj_num;
args[2].j = info->min_num;
args[3].i = (jint)info->line;
if (NULL == (str1 = CBENVPTR->NewStringUTF(CBENVONLY, info->func_name)))
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_FALSE);
args[4].l = str1;
if (NULL == (str2 = CBENVPTR->NewStringUTF(CBENVONLY, info->file_name)))
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_FALSE);
args[5].l = str2;
if (NULL == (str3 = CBENVPTR->NewStringUTF(CBENVONLY, info->desc)))
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_FALSE);
args[6].l = str3;
CALL_CONSTRUCTOR(CBENVONLY, "hdf/hdf5lib/structs/H5E_error2_t",
"(JJJILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", args, cb_info_t);
status = CBENVPTR->CallIntMethod(CBENVONLY, visit_callback, mid, nindx, cb_info_t, op_data);
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_FALSE);
done:
if (CBENVONLY)
JVMPTR->DetachCurrentThread(JVMPAR);
return (herr_t)status;
} /* end H5E_walk_cb */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Ewalk2
* Signature: (JJLjava/lang/Object;Ljava/lang/Object;)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Ewalk2(JNIEnv *env, jclass clss, jlong stk_id, jlong direction, jobject callback_op,
jobject op_data)
{
cb_wrapper wrapper = {callback_op, op_data};
UNUSED(clss);
ENVPTR->GetJavaVM(ENVONLY, &jvm);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
if (NULL == op_data)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Ewalk2: op_data is NULL");
if (NULL == callback_op)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Ewalk2: callback_op is NULL");
if (H5Ewalk2(stk_id, (H5E_direction_t)direction, (H5E_walk2_t)H5E_walk_cb, (void *)&wrapper) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return;
} /* end iJava_hdf_hdf5lib_H5_H5Ewalk2f */
#ifdef __cplusplus
} /* end extern "C" */
#endif /* __cplusplus */
+147
View File
@@ -0,0 +1,147 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <jni.h>
/* Header for class hdf_hdf5lib_H5_H5E */
#ifndef Included_hdf_hdf5lib_H5_H5E
#define Included_hdf_hdf5lib_H5_H5E
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Eauto_is_v2
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_hdf_hdf5lib_H5_H5Eauto_1is_1v2(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Eregister_class
* Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Eregister_1class(JNIEnv *, jclass, jstring, jstring, jstring);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Eunregister_class
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Eunregister_1class(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Eclose_msg
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Eclose_1msg(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Ecreate_msg
* Signature: (JILjava/lang/String;)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Ecreate_1msg(JNIEnv *, jclass, jlong, jint, jstring);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Ecreate_stack
* Signature: ()J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Ecreate_1stack(JNIEnv *, jclass);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Eget_current_stack
* Signature: ()J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Eget_1current_1stack(JNIEnv *, jclass);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Eclose_stack
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Eclose_1stack(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Eprint2
* Signature: (JLjava/lang/Object;)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Eprint2(JNIEnv *, jclass, jlong, jobject);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Eget_class_name
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_hdf_hdf5lib_H5_H5Eget_1class_1name(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Eset_current_stack
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Eset_1current_1stack(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Epop
* Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Epop(JNIEnv *, jclass, jlong, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Epush2
* Signature: (JLjava/lang/String;Ljava/lang/String;IJJJLjava/lang/String;)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Epush2(JNIEnv *, jclass, jlong, jstring, jstring, jint, jlong,
jlong, jlong, jstring);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Eclear2
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Eclear2(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Eget_msg
* Signature: (J[I)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_hdf_hdf5lib_H5_H5Eget_1msg(JNIEnv *, jclass, jlong, jintArray);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Eget_num
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Eget_1num(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Ewalk2
* Signature: (JJLjava/lang/Object;Ljava/lang/Object;)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Ewalk2(JNIEnv *, jclass, jlong, jlong, jobject, jobject);
#ifdef __cplusplus
} /* end extern "C" */
#endif /* __cplusplus */
#endif /* Included_hdf_hdf5lib_H5_H5E */
+784
View File
@@ -0,0 +1,784 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include <jni.h>
#include <stdio.h>
#include <stdlib.h>
#include "hdf5.h"
#include "h5fImp.h"
#include "h5util.h"
/*
* Pointer to the JNI's Virtual Machine; used for callback functions.
*/
/* extern JavaVM *jvm; */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fopen
* Signature: (Ljava/lang/String;IJ)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Fopen(JNIEnv *env, jclass clss, jstring name, jint flags, jlong access_id)
{
const char *fileName = NULL;
hid_t status = H5I_INVALID_HID;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Fopen: file name is NULL");
PIN_JAVA_STRING(ENVONLY, name, fileName, NULL, "H5Fopen: file name not pinned");
if ((status = H5Fopen(fileName, (unsigned)flags, (hid_t)access_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (fileName)
UNPIN_JAVA_STRING(ENVONLY, name, fileName);
return (jlong)status;
} /* end Java_hdf_hdf5lib_H5__1H5Fopen */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fcreate
* Signature: (Ljava/lang/String;IJJ)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Fcreate(JNIEnv *env, jclass clss, jstring name, jint flags, jlong create_id,
jlong access_id)
{
const char *fileName = NULL;
hid_t status = H5I_INVALID_HID;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Fcreate: file name is NULL");
PIN_JAVA_STRING(ENVONLY, name, fileName, NULL, "H5Fcreate: file name not pinned");
if ((status = H5Fcreate(fileName, (unsigned)flags, create_id, access_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (fileName)
UNPIN_JAVA_STRING(ENVONLY, name, fileName);
return (jlong)status;
} /* end Java_hdf_hdf5lib_H5__1H5Fcreate */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fflush
* Signature: (JI)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Fflush(JNIEnv *env, jclass clss, jlong object_id, jint scope)
{
herr_t retVal = FAIL;
UNUSED(clss);
if ((retVal = H5Fflush((hid_t)object_id, (H5F_scope_t)scope)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jint)retVal;
} /* end Java_hdf_hdf5lib_H5_H5Fflush */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fget_name
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
Java_hdf_hdf5lib_H5_H5Fget_1name(JNIEnv *env, jclass clss, jlong file_id)
{
jstring str = NULL;
ssize_t buf_size;
char *namePtr = NULL;
UNUSED(clss);
/* Get the length of the name */
if ((buf_size = H5Fget_name((hid_t)file_id, NULL, 0)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (namePtr = (char *)malloc(sizeof(char) * (size_t)buf_size + 1)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Fget_name: malloc failed");
if ((H5Fget_name((hid_t)file_id, namePtr, (size_t)buf_size + 1)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
namePtr[buf_size] = '\0';
if (NULL == (str = ENVPTR->NewStringUTF(ENVONLY, namePtr)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
done:
if (namePtr)
free(namePtr);
return str;
} /* end Java_hdf_hdf5lib_H5_H5Fget_1name */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fis_hdf5
* Signature: (Ljava/lang/String;)Z
*/
JNIEXPORT jboolean JNICALL
Java_hdf_hdf5lib_H5_H5Fis_1hdf5(JNIEnv *env, jclass clss, jstring name)
{
#ifndef H5_NO_DEPRECATED_SYMBOLS
const char *fileName = NULL;
#endif
htri_t bval = JNI_FALSE;
UNUSED(clss);
#ifdef H5_NO_DEPRECATED_SYMBOLS
UNUSED(name);
H5_UNIMPLEMENTED(ENVONLY, "H5Fis_hdf5: not implemented");
#else
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Fis_hdf5: file name is NULL");
PIN_JAVA_STRING(ENVONLY, name, fileName, NULL, "H5Fis_hdf5: file name not pinned");
if ((bval = H5Fis_hdf5(fileName)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
bval = (bval > 0) ? JNI_TRUE : JNI_FALSE;
#endif
done:
#ifndef H5_NO_DEPRECATED_SYMBOLS
if (fileName)
UNPIN_JAVA_STRING(ENVONLY, name, fileName);
#endif
return (jboolean)bval;
} /* end 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 fapl_id)
{
const char *fileName = NULL;
htri_t bval = JNI_FALSE;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Fis_accessible: file name is NULL");
PIN_JAVA_STRING(ENVONLY, name, fileName, NULL, "H5Fis_accessible: file name not pinned");
if ((bval = H5Fis_accessible(fileName, (hid_t)fapl_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
bval = (bval > 0) ? JNI_TRUE : JNI_FALSE;
done:
if (fileName)
UNPIN_JAVA_STRING(ENVONLY, name, fileName);
return (jboolean)bval;
} /* end Java_hdf_hdf5lib_H5_H5Fis_1accessible */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fget_create_plist
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Fget_1create_1plist(JNIEnv *env, jclass clss, jlong file_id)
{
hid_t retVal = H5I_INVALID_HID;
UNUSED(clss);
if ((retVal = H5Fget_create_plist((hid_t)file_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jlong)retVal;
} /* end Java_hdf_hdf5lib_H5__1H5Fget_1create_1plist */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fget_access_plist
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Fget_1access_1plist(JNIEnv *env, jclass clss, jlong file_id)
{
hid_t retVal = H5I_INVALID_HID;
UNUSED(clss);
if ((retVal = H5Fget_access_plist((hid_t)file_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jlong)retVal;
} /* end Java_hdf_hdf5lib_H5__1H5Fget_1access_1plist */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fget_intent
* Signature: (J)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Fget_1intent(JNIEnv *env, jclass clss, jlong file_id)
{
unsigned intent = 0;
UNUSED(clss);
if (H5Fget_intent((hid_t)file_id, &intent) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jint)intent;
} /* end 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 *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
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5__1H5Fclose(JNIEnv *env, jclass clss, jlong file_id)
{
herr_t status = FAIL;
UNUSED(clss);
if ((status = H5Fclose((hid_t)file_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jint)status;
} /* end Java_hdf_hdf5lib_H5__1H5Fclose */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fmount
* Signature: (JLjava/lang/String;JJ)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Fmount(JNIEnv *env, jclass clss, jlong loc_id, jstring name, jlong child_id,
jlong plist_id)
{
const char *fileName = NULL;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Fmount: file name is NULL");
PIN_JAVA_STRING(ENVONLY, name, fileName, NULL, "H5Fmount: file name not pinned");
if ((status = H5Fmount((hid_t)loc_id, fileName, (hid_t)child_id, (hid_t)plist_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (fileName)
UNPIN_JAVA_STRING(ENVONLY, name, fileName);
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Fmount */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Funmount
* Signature: (JLjava/lang/String;)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Funmount(JNIEnv *env, jclass clss, jlong loc_id, jstring name)
{
const char *fileName = NULL;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Funmount: file name is NULL");
PIN_JAVA_STRING(ENVONLY, name, fileName, NULL, "H5Funmount: file name not pinned");
if ((status = H5Funmount((hid_t)loc_id, fileName)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (fileName)
UNPIN_JAVA_STRING(ENVONLY, name, fileName);
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Funmount */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fget_freespace
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5_H5Fget_1freespace(JNIEnv *env, jclass clss, jlong file_id)
{
hssize_t ret_val = -1;
UNUSED(clss);
if ((ret_val = H5Fget_freespace((hid_t)file_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jlong)ret_val;
} /* end Java_hdf_hdf5lib_H5_H5Fget_1freespace */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Freopen
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Freopen(JNIEnv *env, jclass clss, jlong file_id)
{
hid_t retVal = H5I_INVALID_HID;
UNUSED(clss);
if ((retVal = H5Freopen((hid_t)file_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jlong)retVal;
} /* end Java_hdf_hdf5lib_H5__1H5Freopen */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fget_obj_ids
* Signature: (JIJ[J)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5_H5Fget_1obj_1ids(JNIEnv *env, jclass clss, jlong file_id, jint types, jlong maxObjs,
jlongArray obj_id_list)
{
jboolean isCopy;
ssize_t ret_val = -1;
size_t i;
jsize rank;
jlong *obj_id_listP = NULL;
hid_t *id_list = NULL;
UNUSED(clss);
if (NULL == obj_id_list)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Fget_obj_ids: obj_id_list is NULL");
PIN_LONG_ARRAY(ENVONLY, obj_id_list, obj_id_listP, &isCopy, "H5Fget_obj_ids: obj_id_list not pinned");
if ((rank = ENVPTR->GetArrayLength(ENVONLY, obj_id_list)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Fget_obj_ids: obj_id_list length < 0");
}
if (NULL == (id_list = (hid_t *)malloc((size_t)rank * sizeof(hid_t))))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Fget_obj_ids: malloc failed");
if ((ret_val = H5Fget_obj_ids((hid_t)file_id, (unsigned int)types, (size_t)maxObjs, id_list)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
for (i = 0; i < (size_t)rank; i++) {
obj_id_listP[i] = (jlong)id_list[i];
} /* end for */
done:
if (id_list)
free(id_list);
if (obj_id_listP)
UNPIN_LONG_ARRAY(ENVONLY, obj_id_list, obj_id_listP, (ret_val < 0) ? JNI_ABORT : 0);
return (jlong)ret_val;
} /* end Java_hdf_hdf5lib_H5_H5Fget_1obj_1ids */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fget_obj_count
* Signature: (JI)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5_H5Fget_1obj_1count(JNIEnv *env, jclass clss, jlong file_id, jint types)
{
ssize_t ret_val = -1;
UNUSED(clss);
if ((ret_val = H5Fget_obj_count((hid_t)file_id, (unsigned int)types)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jlong)ret_val;
} /* end Java_hdf_hdf5lib_H5_H5Fget_1obj_1count_1long */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fget_filesize
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5_H5Fget_1filesize(JNIEnv *env, jclass clss, jlong file_id)
{
hsize_t size = 0;
UNUSED(clss);
if (H5Fget_filesize((hid_t)file_id, &size) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jlong)size;
} /* end Java_hdf_hdf5lib_H5_H5Fget_1filesize */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fget_mdc_hit_rate
* Signature: (J)D
*/
JNIEXPORT jdouble JNICALL
Java_hdf_hdf5lib_H5_H5Fget_1mdc_1hit_1rate(JNIEnv *env, jclass clss, jlong file_id)
{
double rate = 0.0;
UNUSED(clss);
if (H5Fget_mdc_hit_rate((hid_t)file_id, &rate) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jdouble)rate;
} /* end Java_hdf_hdf5lib_H5_H5Fget_1mdc_1hit_1rate */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fget_mdc_size
* Signature: (J[J)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Fget_1mdc_1size(JNIEnv *env, jclass clss, jlong file_id, jlongArray metadata_cache)
{
jboolean isCopy;
size_t max_size = 0, min_clean_size = 0, cur_size = 0;
jlong *metadata_cache_ptr = NULL;
jsize size = 0;
int cur_num_entries = -1;
UNUSED(clss);
if (NULL == metadata_cache)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Fget_mdc_size: metadata cache array is NULL");
if ((size = ENVPTR->GetArrayLength(ENVONLY, metadata_cache)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Fget_mdc_size: metadata_cache length < 0");
}
if (size < 3)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Fget_mdc_size: length of metadata_cache array < 3");
if (H5Fget_mdc_size((hid_t)file_id, &max_size, &min_clean_size, &cur_size, &cur_num_entries) < 0)
H5_LIBRARY_ERROR(ENVONLY);
PIN_LONG_ARRAY(ENVONLY, metadata_cache, metadata_cache_ptr, &isCopy,
"H5Fget_mdc_size: metadata_cache array not pinned");
metadata_cache_ptr[0] = (jlong)max_size;
metadata_cache_ptr[1] = (jlong)min_clean_size;
metadata_cache_ptr[2] = (jlong)cur_size;
done:
if (metadata_cache_ptr)
UNPIN_LONG_ARRAY(ENVONLY, metadata_cache, metadata_cache_ptr, 0);
return (jint)cur_num_entries;
} /* end Java_hdf_hdf5lib_H5_H5Fget_1mdc_1size */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fget_info
* Signature: (J)Lhdf/hdf5lib/structs/H5F_info2_t;
*/
JNIEXPORT jobject JNICALL
Java_hdf_hdf5lib_H5_H5Fget_1info(JNIEnv *env, jclass clss, jlong obj_id)
{
H5F_info2_t finfo;
jobject ihinfobuf;
jvalue args[9];
jobject ret_obj = NULL;
UNUSED(clss);
if (H5Fget_info2((hid_t)obj_id, &finfo) < 0)
H5_LIBRARY_ERROR(ENVONLY);
args[0].j = (jlong)finfo.sohm.msgs_info.index_size;
args[1].j = (jlong)finfo.sohm.msgs_info.heap_size;
CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5_ih_info_t", "(JJ)V", args, ret_obj);
ihinfobuf = ret_obj;
args[0].i = (jint)finfo.super.version;
args[1].j = (jlong)finfo.super.super_size;
args[2].j = (jlong)finfo.super.super_ext_size;
args[3].i = (jint)finfo.free.version;
args[4].j = (jlong)finfo.free.meta_size;
args[5].j = (jlong)finfo.free.tot_space;
args[6].j = (jint)finfo.sohm.version;
args[7].j = (jlong)finfo.sohm.hdr_size;
args[8].l = ihinfobuf;
CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5F_info2_t",
"(IJJIJJIJLhdf/hdf5lib/structs/H5_ih_info_t;)V", args, ret_obj);
done:
return ret_obj;
} /* end Java_hdf_hdf5lib_H5_H5Fget_1info */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Freset_mdc_hit_rate_stats
* Signature: (J)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Freset_1mdc_1hit_1rate_1stats(JNIEnv *env, jclass clss, jlong file_id)
{
UNUSED(clss);
if (H5Freset_mdc_hit_rate_stats((hid_t)file_id) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return;
} /* end Java_hdf_hdf5lib_H5_H5Freset_1mdc_1hit_1rate_1stats */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fclear_elink_file_cache
* Signature: (J)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Fclear_1elink_1file_1cache(JNIEnv *env, jclass clss, jlong file_id)
{
UNUSED(clss);
if (H5Fclear_elink_file_cache((hid_t)file_id) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return;
} /* end Java_hdf_hdf5lib_H5_H5Fclear_1elink_1file_1cache */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fstart_swmr_write
* Signature: (J)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Fstart_1swmr_1write(JNIEnv *env, jclass clss, jlong file_id)
{
UNUSED(clss);
if (H5Fstart_swmr_write((hid_t)file_id) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return;
} /* end Java_hdf_hdf5lib_H5_H5Fstart_1swmr_1write */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fstart_mdc_logging
* Signature: (J)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Fstart_1mdc_1logging(JNIEnv *env, jclass clss, jlong file_id)
{
UNUSED(clss);
if (H5Fstart_mdc_logging((hid_t)file_id) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return;
} /* end Java_hdf_hdf5lib_H5_H5Fstart_1mdc_1logging */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fstop_mdc_logging
* Signature: (J)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Fstop_1mdc_1logging(JNIEnv *env, jclass clss, jlong file_id)
{
UNUSED(clss);
if (H5Fstop_mdc_logging((hid_t)file_id) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return;
} /* end Java_hdf_hdf5lib_H5_H5Fstop_1mdc_1logging */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fget_mdc_logging_status
* Signature: (J[Z)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Fget_1mdc_1logging_1status(JNIEnv *env, jclass clss, jlong file_id,
jbooleanArray mdc_logging_status)
{
jboolean *mdc_logging_status_ptr = NULL;
jboolean isCopy;
bool is_enabled;
bool is_currently_logging;
jsize size;
UNUSED(clss);
if (NULL == mdc_logging_status)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Fget_mdc_logging_status: mdc_logging_status is NULL");
if ((size = ENVPTR->GetArrayLength(ENVONLY, mdc_logging_status)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Fget_mdc_logging_status: mdc_logging_status length < 0");
}
if (size < 2)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Fget_mdc_logging_status: length of mdc_logging_status < 2");
if (H5Fget_mdc_logging_status((hid_t)file_id, &is_enabled, &is_currently_logging) < 0)
H5_LIBRARY_ERROR(ENVONLY);
PIN_BOOL_ARRAY(ENVONLY, mdc_logging_status, mdc_logging_status_ptr, &isCopy,
"H5Fget_mdc_logging_status: mdc_logging_status array not pinned");
mdc_logging_status_ptr[0] = (jboolean)is_enabled;
mdc_logging_status_ptr[1] = (jboolean)is_currently_logging;
done:
if (mdc_logging_status_ptr)
UNPIN_BOOL_ARRAY(ENVONLY, mdc_logging_status, mdc_logging_status_ptr, 0);
return;
} /* end Java_hdf_hdf5lib_H5_H5Fget_1mdc_1logging_1status */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fset_dset_no_attrs_hint
* Signature: (JZ)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Fset_1dset_1no_1attrs_1hint(JNIEnv *env, jclass clss, jlong file_id, jboolean minimize)
{
bool minimize_val;
herr_t retVal = FAIL;
UNUSED(clss);
minimize_val = (minimize == JNI_TRUE) ? true : false;
if ((retVal = H5Fset_dset_no_attrs_hint((hid_t)file_id, (bool)minimize_val)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return;
} /* end Java_hdf_hdf5lib_H5_H5Fset_1dset_1no_1attrs_1hint */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fget_dset_no_attrs_hint
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
Java_hdf_hdf5lib_H5_H5Fget_1dset_1no_1attrs_1hint(JNIEnv *env, jclass clss, jlong file_id)
{
jboolean bval = JNI_FALSE;
bool minimize = false;
UNUSED(clss);
if (H5Fget_dset_no_attrs_hint((hid_t)file_id, (bool *)&minimize) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (minimize == true)
bval = JNI_TRUE;
done:
return bval;
} /* end Java_hdf_hdf5lib_H5_H5Fget_1dset_1no_1attrs_1hint */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fset_libver_bounds
* Signature: (JII)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Fset_1libver_1bounds(JNIEnv *env, jclass clss, jlong file_id, jint low, jint high)
{
herr_t retVal = FAIL;
UNUSED(clss);
if ((retVal = H5Fset_libver_bounds((hid_t)file_id, (H5F_libver_t)low, (H5F_libver_t)high)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return;
} /* end Java_hdf_hdf5lib_H5_H5Fset_1libver_1bounds */
#ifdef __cplusplus
} /* end extern "C" */
#endif /* __cplusplus */
+239
View File
@@ -0,0 +1,239 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <jni.h>
/* Header for class hdf_hdf5lib_H5_H5F */
#ifndef Included_hdf_hdf5lib_H5_H5F
#define Included_hdf_hdf5lib_H5_H5F
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fopen
* Signature: (Ljava/lang/String;IJ)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Fopen(JNIEnv *, jclass, jstring, jint, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fcreate
* Signature: (Ljava/lang/String;IJJ)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Fcreate(JNIEnv *, jclass, jstring, jint, jlong, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fflush
* Signature: (JI)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Fflush(JNIEnv *, jclass, jlong, jint);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fget_name
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_hdf_hdf5lib_H5_H5Fget_1name(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fis_hdf5
* Signature: (Ljava/lang/String;)Z
*/
JNIEXPORT jboolean JNICALL Java_hdf_hdf5lib_H5_H5Fis_1hdf5(JNIEnv *, jclass, jstring);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fis_accessible
* Signature: (Ljava/lang/String;J)Z
*/
JNIEXPORT jboolean JNICALL Java_hdf_hdf5lib_H5_H5Fis_1accessible(JNIEnv *, jclass, jstring, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fget_create_plist
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Fget_1create_1plist(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fget_access_plist
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Fget_1access_1plist(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fget_intent
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Fget_1intent(JNIEnv *, jclass, jlong);
/*
* 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
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5__1H5Fclose(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fmount
* Signature: (JLjava/lang/String;JJ)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Fmount(JNIEnv *, jclass, jlong, jstring, jlong, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Funmount
* Signature: (JLjava/lang/String;)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Funmount(JNIEnv *, jclass, jlong, jstring);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fget_freespace
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Fget_1freespace(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Freopen
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Freopen(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fget_obj_ids
* Signature: (JIJ[J)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Fget_1obj_1ids(JNIEnv *, jclass, jlong, jint, jlong,
jlongArray);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fget_obj_count
* Signature: (JI)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Fget_1obj_1count(JNIEnv *, jclass, jlong, jint);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fget_filesize
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Fget_1filesize(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fget_mdc_hit_rate
* Signature: (J)D
*/
JNIEXPORT jdouble JNICALL Java_hdf_hdf5lib_H5_H5Fget_1mdc_1hit_1rate(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fget_mdc_size
* Signature: (J[J)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Fget_1mdc_1size(JNIEnv *, jclass, jlong, jlongArray);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Freset_mdc_hit_rate_stats
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Freset_1mdc_1hit_1rate_1stats(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fget_info
* Signature: (J)Lhdf/hdf5lib/structs/H5F_info2_t;
*/
JNIEXPORT jobject JNICALL Java_hdf_hdf5lib_H5_H5Fget_1info(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fclear_elink_file_cache
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Fclear_1elink_1file_1cache(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fstart_swmr_write
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Fstart_1swmr_1write(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fstart_mdc_logging
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Fstart_1mdc_1logging(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fstop_mdc_logging
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Fstop_1mdc_1logging(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fget_mdc_logging_status
* Signature: (J[Z)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Fget_1mdc_1logging_1status(JNIEnv *, jclass, jlong,
jbooleanArray);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fset_dset_no_attrs_hint
* Signature: (JZ)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Fset_1dset_1no_1attrs_1hint(JNIEnv *, jclass, jlong, jboolean);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fget_dset_no_attrs_hint
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_hdf_hdf5lib_H5_H5Fget_1dset_1no_1attrs_1hint(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Fset_libver_bounds
* Signature: (JII)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Fset_1libver_1bounds(JNIEnv *, jclass, jlong, jint, jint);
#ifdef __cplusplus
} /* end extern "C" */
#endif /* __cplusplus */
#endif /* Included_hdf_hdf5lib_H5_H5F */
+335
View File
@@ -0,0 +1,335 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include <jni.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "hdf5.h"
#include "h5util.h"
#include "h5gImp.h"
/*
* Pointer to the JNI's Virtual Machine; used for callback functions.
*/
/* extern JavaVM *jvm; */
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Gclose
* Signature: (J)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5__1H5Gclose(JNIEnv *env, jclass clss, jlong group_id)
{
herr_t retVal = FAIL;
UNUSED(clss);
if ((retVal = H5Gclose((hid_t)group_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jint)retVal;
} /* end Java_hdf_hdf5lib_H5__1H5Gclose */
/*
* Create a java object of hdf.h5.structs.H5G_info_t
* public class H5G_info_t {
* public H5G_STORAGE_TYPE storage_type; // Type of storage for links in group
* public long nlinks; // Number of links in group
* public long max_corder; // Current max. creation order value for group
* public int mounted; // Whether group has a file mounted on it
* }
*
*/
jobject
create_H5G_info_t(JNIEnv *env, H5G_info_t group_info)
{
jfieldID fid_storage_type, fid_nlinks, fid_max_corder, fid_mounted;
jboolean jmounted;
jclass cls;
jint storage_type;
jobject obj = NULL;
if (NULL == (cls = ENVPTR->FindClass(ENVONLY, "hdf/hdf5lib/structs/H5G_info_t")))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
if (NULL == (obj = ENVPTR->AllocObject(ENVONLY, cls)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
if (NULL == (fid_storage_type = ENVPTR->GetFieldID(ENVONLY, cls, "storage_type", "I")))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
if (NULL == (fid_nlinks = ENVPTR->GetFieldID(ENVONLY, cls, "nlinks", "J")))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
if (NULL == (fid_max_corder = ENVPTR->GetFieldID(ENVONLY, cls, "max_corder", "J")))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
if (NULL == (fid_mounted = ENVPTR->GetFieldID(ENVONLY, cls, "mounted", "Z")))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
jmounted = (group_info.mounted == 0) ? JNI_FALSE : JNI_TRUE;
storage_type = (jint)group_info.storage_type;
ENVPTR->SetIntField(ENVONLY, obj, fid_storage_type, (jint)storage_type);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
ENVPTR->SetLongField(ENVONLY, obj, fid_nlinks, (jlong)group_info.nlinks);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
ENVPTR->SetLongField(ENVONLY, obj, fid_max_corder, (jlong)group_info.max_corder);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
ENVPTR->SetBooleanField(ENVONLY, obj, fid_mounted, jmounted);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
done:
return obj;
} /* end create_H5G_info_t */
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Gcreate2
* Signature: (JLjava/lang/String;JJJ)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Gcreate2(JNIEnv *env, jclass clss, jlong loc_id, jstring name, jlong link_plist_id,
jlong create_plist_id, jlong access_plist_id)
{
const char *grpName = NULL;
hid_t group_id = H5I_INVALID_HID;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Gcreate2: group name is NULL");
PIN_JAVA_STRING(ENVONLY, name, grpName, NULL, "H5Gcreate2: group name not pinned");
if ((group_id = H5Gcreate2((hid_t)loc_id, grpName, (hid_t)link_plist_id, (hid_t)create_plist_id,
(hid_t)access_plist_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (grpName)
UNPIN_JAVA_STRING(ENVONLY, name, grpName);
return (jlong)group_id;
} /* end Java_hdf_hdf5lib_H5__1H5Gcreate2 */
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Gcreate_anon
* Signature: (JJJ)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Gcreate_1anon(JNIEnv *env, jclass clss, jlong loc_id, jlong gcpl_id, jlong gapl_id)
{
hid_t group_id = H5I_INVALID_HID;
UNUSED(clss);
if ((group_id = H5Gcreate_anon((hid_t)loc_id, (hid_t)gcpl_id, (hid_t)gapl_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jlong)group_id;
} /* end Java_hdf_hdf5lib_H5__1H5Gcreate_1anon */
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Gopen2
* Signature: (JLjava/lang/String;J)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Gopen2(JNIEnv *env, jclass clss, jlong loc_id, jstring name, jlong access_plist_id)
{
const char *grpName = NULL;
hid_t group_id = H5I_INVALID_HID;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Gopen2: group name is NULL");
PIN_JAVA_STRING(ENVONLY, name, grpName, NULL, "H5Gopen2: group name not pinned");
if ((group_id = H5Gopen2((hid_t)loc_id, grpName, (hid_t)access_plist_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (grpName)
UNPIN_JAVA_STRING(ENVONLY, name, grpName);
return (jlong)group_id;
} /* end Java_hdf_hdf5lib_H5__1H5Gopen2 */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Gget_create_plist
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5_H5Gget_1create_1plist(JNIEnv *env, jclass clss, jlong loc_id)
{
hid_t plist_id = H5I_INVALID_HID;
UNUSED(clss);
if ((plist_id = H5Gget_create_plist((hid_t)loc_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jlong)plist_id;
} /* end Java_hdf_hdf5lib_H5_H5Gget_1create_1plist */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Gget_info
* Signature: (J)Lhdf/hdf5lib/structs/H5G_info_t;
*/
JNIEXPORT jobject JNICALL
Java_hdf_hdf5lib_H5_H5Gget_1info(JNIEnv *env, jclass clss, jlong loc_id)
{
H5G_info_t group_info;
jobject obj = NULL;
UNUSED(clss);
if (H5Gget_info((hid_t)loc_id, &group_info) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (obj = create_H5G_info_t(env, group_info)))
H5_JNI_FATAL_ERROR(ENVONLY, "H5Gget_info: unable to create H5G_info_t object");
done:
return obj;
} /* end Java_hdf_hdf5lib_H5_H5Gget_1info */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Gget_info_by_name
* Signature: (JLjava/lang/String;J)Lhdf/hdf5lib/structs/H5G_info_t;
*/
JNIEXPORT jobject JNICALL
Java_hdf_hdf5lib_H5_H5Gget_1info_1by_1name(JNIEnv *env, jclass clss, jlong loc_id, jstring name,
jlong lapl_id)
{
H5G_info_t group_info;
const char *grpName = NULL;
jobject obj = NULL;
herr_t ret_val = FAIL;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Gget_info_by_name: group name is NULL");
PIN_JAVA_STRING(ENVONLY, name, grpName, NULL, "H5Gget_info_by_name: group name not pinned");
if ((ret_val = H5Gget_info_by_name((hid_t)loc_id, grpName, &group_info, (hid_t)lapl_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (obj = create_H5G_info_t(env, group_info))) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_JNI_FATAL_ERROR(ENVONLY, "H5Gget_info_by_name: unable to create H5G_info_t object");
}
done:
if (grpName)
UNPIN_JAVA_STRING(ENVONLY, name, grpName);
return obj;
} /* end Java_hdf_hdf5lib_H5_H5Gget_1info_1by_1name */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Gget_info_by_idx
* Signature: (JLjava/lang/String;IIJJ)Lhdf/hdf5lib/structs/H5G_info_t;
*/
JNIEXPORT jobject JNICALL
Java_hdf_hdf5lib_H5_H5Gget_1info_1by_1idx(JNIEnv *env, jclass clss, jlong loc_id, jstring name,
jint index_type, jint order, jlong n, jlong lapl_id)
{
H5_iter_order_t corder = (H5_iter_order_t)order;
H5_index_t cindex_type = (H5_index_t)index_type;
H5G_info_t group_info;
const char *grpName = NULL;
jobject obj = NULL;
herr_t ret_val = FAIL;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Gget_info_by_idx: group name is NULL");
PIN_JAVA_STRING(ENVONLY, name, grpName, NULL, "H5Gget_info_by_idx: group name not pinned");
if ((ret_val = H5Gget_info_by_idx((hid_t)loc_id, grpName, cindex_type, corder, (hsize_t)n, &group_info,
(hid_t)lapl_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (obj = create_H5G_info_t(env, group_info))) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
H5_JNI_FATAL_ERROR(ENVONLY, "H5Gget_info_by_idx: unable to create H5G_info_t object");
}
done:
if (grpName)
UNPIN_JAVA_STRING(ENVONLY, name, grpName);
return obj;
} /* end Java_hdf_hdf5lib_H5_H5Gget_1info_1by_1idx */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Gflush
* Signature: (J)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Gflush(JNIEnv *env, jclass clss, jlong loc_id)
{
UNUSED(clss);
if (H5Gflush((hid_t)loc_id) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return;
} /* end Java_hdf_hdf5lib_H5_H5Gflush */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Grefresh
* Signature: (J)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Grefresh(JNIEnv *env, jclass clss, jlong loc_id)
{
UNUSED(clss);
if (H5Grefresh((hid_t)loc_id) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return;
} /* end Java_hdf_hdf5lib_H5_H5Grefresh */
#ifdef __cplusplus
} /* end extern "C" */
#endif /* __cplusplus */
+99
View File
@@ -0,0 +1,99 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <jni.h>
/* Header for class hdf_hdf5lib_H5_H5G */
#ifndef Included_hdf_hdf5lib_H5_H5G
#define Included_hdf_hdf5lib_H5_H5G
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Gclose
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5__1H5Gclose(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Gcreate2
* Signature: (JLjava/lang/String;JJJ)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Gcreate2(JNIEnv *, jclass, jlong, jstring, jlong, jlong,
jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Gcreate_anon
* Signature: (JJJ)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Gcreate_1anon(JNIEnv *, jclass, jlong, jlong, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Gopen2
* Signature: (JLjava/lang/String;J)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5__1H5Gopen2(JNIEnv *, jclass, jlong, jstring, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Gget_create_plist
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Gget_1create_1plist(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Gget_info
* Signature: (J)Lhdf/hdf5lib/structs/H5G_info_t;
*/
JNIEXPORT jobject JNICALL Java_hdf_hdf5lib_H5_H5Gget_1info(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Gget_info_by_name
* Signature: (JLjava/lang/String;J)Lhdf/hdf5lib/structs/H5G_info_t;
*/
JNIEXPORT jobject JNICALL Java_hdf_hdf5lib_H5_H5Gget_1info_1by_1name(JNIEnv *, jclass, jlong, jstring, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Gget_info_by_idx
* Signature: (JLjava/lang/String;IIJJ)Lhdf/hdf5lib/structs/H5G_info_t;
*/
JNIEXPORT jobject JNICALL Java_hdf_hdf5lib_H5_H5Gget_1info_1by_1idx(JNIEnv *, jclass, jlong, jstring, jint,
jint, jlong, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Gflush
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Gflush(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Grefresh
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Grefresh(JNIEnv *, jclass, jlong);
#ifdef __cplusplus
} /* end extern "C" */
#endif /* __cplusplus */
#endif /* Included_hdf_hdf5lib_H5_H5G */
+350
View File
@@ -0,0 +1,350 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include "hdf5.h"
#include <stdlib.h>
#include <jni.h>
#include "h5jni.h"
#include "h5iImp.h"
/*
* Pointer to the JNI's Virtual Machine; used for callback functions.
*/
/* extern JavaVM *jvm; */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Iget_type
* Signature: (J)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Iget_1type(JNIEnv *env, jclass clss, jlong obj_id)
{
H5I_type_t retVal = H5I_BADID;
UNUSED(clss);
if (H5I_BADID == (retVal = H5Iget_type((hid_t)obj_id)))
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jint)retVal;
} /* end Java_hdf_hdf5lib_H5_H5Iget_1type */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Iget_name_long
* Signature: (JLjava/lang/String;J)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5_H5Iget_1name_1long(JNIEnv *env, jclass clss, jlong obj_id, jobjectArray name,
jlong buf_size)
{
ssize_t size = -1;
jstring str;
char *aName = NULL;
UNUSED(clss);
if (buf_size < 0)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Iget_name_long: buf_size < 0");
if (NULL == (aName = (char *)malloc(sizeof(char) * (size_t)buf_size + 1)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Iget_name_long: malloc failed");
if ((size = H5Iget_name((hid_t)obj_id, aName, (size_t)buf_size + 1)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
aName[buf_size] = '\0';
if (NULL == (str = ENVPTR->NewStringUTF(ENVONLY, aName)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
ENVPTR->SetObjectArrayElement(ENVONLY, name, 0, str);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
done:
if (aName)
free(aName);
return (jlong)size;
} /* end Java_hdf_hdf5lib_H5_H5Iget_1name */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Iget_name
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
Java_hdf_hdf5lib_H5_H5Iget_1name(JNIEnv *env, jclass clss, jlong obj_id)
{
jstring str = NULL;
ssize_t buf_size = -1;
char *aName = NULL;
UNUSED(clss);
/* Get the length of the name */
if ((buf_size = H5Iget_name((hid_t)obj_id, NULL, 0)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (aName = (char *)malloc(sizeof(char) * (size_t)buf_size + 1)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Iget_name: malloc failed");
if (H5Iget_name((hid_t)obj_id, aName, (size_t)buf_size + 1) < 0)
H5_LIBRARY_ERROR(ENVONLY);
aName[buf_size] = '\0';
if (NULL == (str = ENVPTR->NewStringUTF(ENVONLY, aName)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
done:
if (aName)
free(aName);
return str;
} /* end Java_hdf_hdf5lib_H5_H5Iget_1name */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Iget_ref
* Signature: (J)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Iget_1ref(JNIEnv *env, jclass clss, jlong obj_id)
{
int retVal = FAIL;
UNUSED(clss);
if ((retVal = H5Iget_ref((hid_t)obj_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jint)retVal;
} /* end Java_hdf_hdf5lib_H5_H5Iget_1ref */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Iinc_ref
* Signature: (J)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Iinc_1ref(JNIEnv *env, jclass clss, jlong obj_id)
{
int retVal = FAIL;
UNUSED(clss);
if ((retVal = H5Iinc_ref((hid_t)obj_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jint)retVal;
} /* end Java_hdf_hdf5lib_H5_H5Iinc_1ref */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Idec_1ref
* Signature: (J)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Idec_1ref(JNIEnv *env, jclass clss, jlong obj_id)
{
int retVal = FAIL;
UNUSED(clss);
if ((retVal = H5Idec_ref((hid_t)obj_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jint)retVal;
} /* end Java_hdf_hdf5lib_H5_H5Idec_1ref */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Iget_file_id
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5_H5Iget_1file_1id(JNIEnv *env, jclass clss, jlong obj_id)
{
hid_t file_id = H5I_INVALID_HID;
UNUSED(clss);
if ((file_id = H5Iget_file_id((hid_t)obj_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jlong)file_id;
} /* end Java_hdf_hdf5lib_H5_H5Iget_1file_1id */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Iget_type_ref
* Signature: (I)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Iget_1type_1ref(JNIEnv *env, jclass clss, jint type)
{
int retVal = FAIL;
UNUSED(clss);
if ((retVal = H5Iget_type_ref((H5I_type_t)type)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jint)retVal;
} /* end Java_hdf_hdf5lib_H5_H5Iget_1type_1ref */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Idec_type_ref
* Signature: (I)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Idec_1type_1ref(JNIEnv *env, jclass clss, jint type)
{
int retVal = FAIL;
UNUSED(clss);
if ((retVal = H5Idec_type_ref((H5I_type_t)type)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jint)retVal;
} /* end Java_hdf_hdf5lib_H5_H5Idec_1type_1ref */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Iinc_type_ref
* Signature: (I)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Iinc_1type_1ref(JNIEnv *env, jclass clss, jint type)
{
int retVal = FAIL;
UNUSED(clss);
if ((retVal = H5Iinc_type_ref((H5I_type_t)type)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jint)retVal;
} /* end Java_hdf_hdf5lib_H5_H5Iinc_1type_1ref */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Inmembers
* Signature: (I)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Inmembers(JNIEnv *env, jclass clss, jint type)
{
hsize_t num_members = 0;
UNUSED(clss);
if (H5Inmembers((H5I_type_t)type, &num_members) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jint)num_members;
} /* end Java_hdf_hdf5lib_H5_H5Inmembers */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Iis_valid
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
Java_hdf_hdf5lib_H5_H5Iis_1valid(JNIEnv *env, jclass clss, jlong obj_id)
{
htri_t bval = JNI_FALSE;
UNUSED(clss);
if ((bval = H5Iis_valid((hid_t)obj_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
bval = (bval > 0) ? JNI_TRUE : JNI_FALSE;
done:
return (jboolean)bval;
} /* end Java_hdf_hdf5lib_H5_H5Iis_1valid */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Itype_exists
* Signature: (I)Z
*/
JNIEXPORT jboolean JNICALL
Java_hdf_hdf5lib_H5_H5Itype_1exists(JNIEnv *env, jclass clss, jint type)
{
htri_t bval = JNI_FALSE;
UNUSED(clss);
if ((bval = H5Itype_exists((H5I_type_t)type)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
bval = (bval > 0) ? JNI_TRUE : JNI_FALSE;
done:
return (jboolean)bval;
} /* end else Java_hdf_hdf5lib_H5_H5Itype_1exists */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Iclear_type
* Signature: (IZ)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Iclear_1type(JNIEnv *env, jclass clss, jint type, jboolean force)
{
UNUSED(clss);
if (H5Iclear_type((H5I_type_t)type, (bool)force) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return;
} /* end Java_hdf_hdf5lib_H5_H5Iclear_1type */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Idestroy_type
* Signature: (I)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Idestroy_1type(JNIEnv *env, jclass clss, jint type)
{
UNUSED(clss);
if (H5Idestroy_type((H5I_type_t)type) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return;
} /* end Java_hdf_hdf5lib_H5_H5Idestroy_1type */
#ifdef __cplusplus
} /* end extern "C" */
#endif /* __cplusplus */
+133
View File
@@ -0,0 +1,133 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <jni.h>
/* Header for class hdf_hdf5lib_H5_H5I */
#ifndef Included_hdf_hdf5lib_H5_H5I
#define Included_hdf_hdf5lib_H5_H5I
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Iget_type
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Iget_1type(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Iget_name_long
* Signature: (JLjava/lang/String;J)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Iget_1name_1long(JNIEnv *, jclass, jlong, jobjectArray, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Iget_name
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_hdf_hdf5lib_H5_H5Iget_1name(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Iget_ref
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Iget_1ref(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Iinc_ref
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Iinc_1ref(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Idec_1ref
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Idec_1ref(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Iget_file_id
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Iget_1file_1id(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Iget_type_ref
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Iget_1type_1ref(JNIEnv *, jclass, jint);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Idec_type_ref
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Idec_1type_1ref(JNIEnv *, jclass, jint);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Iinc_type_ref
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Iinc_1type_1ref(JNIEnv *, jclass, jint);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Inmembers
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Inmembers(JNIEnv *, jclass, jint);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Iis_valid
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_hdf_hdf5lib_H5_H5Iis_1valid(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Itype_exists
* Signature: (I)Z
*/
JNIEXPORT jboolean JNICALL Java_hdf_hdf5lib_H5_H5Itype_1exists(JNIEnv *, jclass, jint);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Iclear_type
* Signature: (IZ)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Iclear_1type(JNIEnv *, jclass, jint, jboolean);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Idestroy_type
* Signature: (I)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Idestroy_1type(JNIEnv *, jclass, jint);
#ifdef __cplusplus
} /* end extern "C" */
#endif /* __cplusplus */
#endif /* Included_hdf_hdf5lib_H5_H5I */
+358
View File
@@ -0,0 +1,358 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <jni.h>
#include "H5version.h"
#include <string.h>
#include "H5private.h"
#ifndef Included_h5jni
#define Included_h5jni
#ifdef __cplusplus
#define ENVPTR (env)
#define ENVONLY
#define CBENVPTR (cbenv)
#define CBENVONLY
#define JVMPTR (jvm)
#define JVMPAR
#else /* __cplusplus */
#define ENVPTR (*env)
#define ENVONLY env
#define CBENVPTR (*cbenv)
#define CBENVONLY cbenv
#define JVMPTR (*jvm)
#define JVMPAR jvm
#endif /* __cplusplus */
/*
* Used to silence compiler when a particular
* function parameter is not used.
*/
#define UNUSED(o) (void)o
/*
* Macro to check for a JNI exception after a JNI method is called.
* If an exception occurred, the value of 'clearException' will determine
* whether or not the exception will be cleared in order for the native
* method to do its own error handling.
*
* If the exception does not get cleared, this macro will skip to the
* cleanup+return section of the native method, since at that point
* cleaning up and returning is the only safe thing that can be done.
*/
#define CHECK_JNI_EXCEPTION(envptr, clearException) \
do { \
if (JNI_TRUE == (*envptr)->ExceptionCheck(envptr)) { \
if (JNI_TRUE == clearException) \
(*envptr)->ExceptionClear(envptr); \
else \
goto done; \
} \
} while (0)
/* Macros for class access */
/* Calling code must define ret_obj as jobject */
#define CALL_CONSTRUCTOR(envptr, classname, classsig, args, ret_obj) \
do { \
jmethodID constructor; \
jclass cls; \
\
if (NULL == (cls = (*envptr)->FindClass(envptr, (classname)))) { \
CHECK_JNI_EXCEPTION(envptr, JNI_TRUE); \
H5_JNI_FATAL_ERROR(envptr, "JNI error: GetObjectClass"); \
} \
if (NULL == (constructor = (*envptr)->GetMethodID(envptr, cls, "<init>", (classsig)))) { \
CHECK_JNI_EXCEPTION(envptr, JNI_TRUE); \
H5_JNI_FATAL_ERROR(envptr, "JNI error: GetMethodID failed"); \
} \
if (NULL == (ret_obj = (*envptr)->NewObjectA(envptr, cls, constructor, (args)))) { \
printf("FATAL ERROR: %s: Creation failed\n", classname); \
CHECK_JNI_EXCEPTION(envptr, JNI_FALSE); \
} \
} while (0)
/*
* Macros for pinning/unpinning objects.
*/
#define PIN_BYTE_ARRAY(envptr, arrayToPin, outBuf, isCopy, failErrMsg) \
do { \
if (NULL == (outBuf = (*envptr)->GetByteArrayElements(envptr, arrayToPin, isCopy))) { \
CHECK_JNI_EXCEPTION(envptr, JNI_TRUE); \
H5_JNI_FATAL_ERROR(envptr, failErrMsg); \
} \
} while (0)
#define PIN_BYTE_ARRAY_CRITICAL(envptr, arrayToPin, outBuf, isCopy, failErrMsg) \
do { \
if (NULL == (outBuf = (jbyte *)(*envptr)->GetPrimitiveArrayCritical(envptr, arrayToPin, isCopy))) { \
CHECK_JNI_EXCEPTION(envptr, JNI_TRUE); \
H5_JNI_FATAL_ERROR(envptr, failErrMsg); \
} \
} while (0)
#define UNPIN_BYTE_ARRAY(envptr, pinnedArray, bufToRelease, freeMode) \
do { \
(*envptr)->ReleaseByteArrayElements(envptr, pinnedArray, (jbyte *)bufToRelease, freeMode); \
} while (0)
#define PIN_SHORT_ARRAY(envptr, arrayToPin, outBuf, isCopy, failErrMsg) \
do { \
if (NULL == (outBuf = (*envptr)->GetShortArrayElements(envptr, arrayToPin, isCopy))) { \
CHECK_JNI_EXCEPTION(envptr, JNI_TRUE); \
H5_JNI_FATAL_ERROR(envptr, failErrMsg); \
} \
} while (0)
#define PIN_SHORT_ARRAY_CRITICAL(envptr, arrayToPin, outBuf, isCopy, failErrMsg) \
do { \
if (NULL == (outBuf = (jshort *)(*envptr)->GetPrimitiveArrayCritical(envptr, arrayToPin, isCopy))) { \
CHECK_JNI_EXCEPTION(envptr, JNI_TRUE); \
H5_JNI_FATAL_ERROR(envptr, failErrMsg); \
} \
} while (0)
#define UNPIN_SHORT_ARRAY(envptr, pinnedArray, bufToRelease, freeMode) \
do { \
(*envptr)->ReleaseShortArrayElements(envptr, pinnedArray, (jshort *)bufToRelease, freeMode); \
} while (0)
#define PIN_INT_ARRAY(envptr, arrayToPin, outBuf, isCopy, failErrMsg) \
do { \
if (NULL == (outBuf = (*envptr)->GetIntArrayElements(envptr, arrayToPin, isCopy))) { \
CHECK_JNI_EXCEPTION(envptr, JNI_TRUE); \
H5_JNI_FATAL_ERROR(envptr, failErrMsg); \
} \
} while (0)
#define PIN_INT_ARRAY_CRITICAL(envptr, arrayToPin, outBuf, isCopy, failErrMsg) \
do { \
if (NULL == (outBuf = (jint *)(*envptr)->GetPrimitiveArrayCritical(envptr, arrayToPin, isCopy))) { \
CHECK_JNI_EXCEPTION(envptr, JNI_TRUE); \
H5_JNI_FATAL_ERROR(envptr, failErrMsg); \
} \
} while (0)
#define UNPIN_INT_ARRAY(envptr, pinnedArray, bufToRelease, freeMode) \
do { \
(*envptr)->ReleaseIntArrayElements(envptr, pinnedArray, (jint *)bufToRelease, freeMode); \
} while (0)
#define PIN_LONG_ARRAY(envptr, arrayToPin, outBuf, isCopy, failErrMsg) \
do { \
if (NULL == (outBuf = (*envptr)->GetLongArrayElements(envptr, arrayToPin, isCopy))) { \
CHECK_JNI_EXCEPTION(envptr, JNI_TRUE); \
H5_JNI_FATAL_ERROR(envptr, failErrMsg); \
} \
} while (0)
#define PIN_LONG_ARRAY_CRITICAL(envptr, arrayToPin, outBuf, isCopy, failErrMsg) \
do { \
if (NULL == (outBuf = (jlong *)(*envptr)->GetPrimitiveArrayCritical(envptr, arrayToPin, isCopy))) { \
CHECK_JNI_EXCEPTION(envptr, JNI_TRUE); \
H5_JNI_FATAL_ERROR(envptr, failErrMsg); \
} \
} while (0)
#define UNPIN_LONG_ARRAY(envptr, pinnedArray, bufToRelease, freeMode) \
do { \
(*envptr)->ReleaseLongArrayElements(envptr, pinnedArray, (jlong *)bufToRelease, freeMode); \
} while (0)
#define PIN_FLOAT_ARRAY(envptr, arrayToPin, outBuf, isCopy, failErrMsg) \
do { \
if (NULL == (outBuf = (*envptr)->GetFloatArrayElements(envptr, arrayToPin, isCopy))) { \
CHECK_JNI_EXCEPTION(envptr, JNI_TRUE); \
H5_JNI_FATAL_ERROR(envptr, failErrMsg); \
} \
} while (0)
#define PIN_FLOAT_ARRAY_CRITICAL(envptr, arrayToPin, outBuf, isCopy, failErrMsg) \
do { \
if (NULL == (outBuf = (jfloat *)(*envptr)->GetPrimitiveArrayCritical(envptr, arrayToPin, isCopy))) { \
CHECK_JNI_EXCEPTION(envptr, JNI_TRUE); \
H5_JNI_FATAL_ERROR(envptr, failErrMsg); \
} \
} while (0)
#define UNPIN_FLOAT_ARRAY(envptr, pinnedArray, bufToRelease, freeMode) \
do { \
(*envptr)->ReleaseFloatArrayElements(envptr, pinnedArray, (jfloat *)bufToRelease, freeMode); \
} while (0)
#define PIN_DOUBLE_ARRAY(envptr, arrayToPin, outBuf, isCopy, failErrMsg) \
do { \
if (NULL == (outBuf = (*envptr)->GetDoubleArrayElements(envptr, arrayToPin, isCopy))) { \
CHECK_JNI_EXCEPTION(envptr, JNI_TRUE); \
H5_JNI_FATAL_ERROR(envptr, failErrMsg); \
} \
} while (0)
#define PIN_DOUBLE_ARRAY_CRITICAL(envptr, arrayToPin, outBuf, isCopy, failErrMsg) \
do { \
if (NULL == \
(outBuf = (jdouble *)(*envptr)->GetPrimitiveArrayCritical(envptr, arrayToPin, isCopy))) { \
CHECK_JNI_EXCEPTION(envptr, JNI_TRUE); \
H5_JNI_FATAL_ERROR(envptr, failErrMsg); \
} \
} while (0)
#define UNPIN_DOUBLE_ARRAY(envptr, pinnedArray, bufToRelease, freeMode) \
do { \
(*envptr)->ReleaseDoubleArrayElements(envptr, pinnedArray, (jdouble *)bufToRelease, freeMode); \
} while (0)
#define PIN_BOOL_ARRAY(envptr, arrayToPin, outBuf, isCopy, failErrMsg) \
do { \
if (NULL == (outBuf = (*envptr)->GetBooleanArrayElements(envptr, arrayToPin, isCopy))) { \
CHECK_JNI_EXCEPTION(envptr, JNI_TRUE); \
H5_JNI_FATAL_ERROR(envptr, failErrMsg); \
} \
} while (0)
#define PIN_BOOL_ARRAY_CRITICAL(envptr, arrayToPin, outBuf, isCopy, failErrMsg) \
do { \
if (NULL == \
(outBuf = (jboolean *)(*envptr)->GetPrimitiveArrayCritical(envptr, arrayToPin, isCopy))) { \
CHECK_JNI_EXCEPTION(envptr, JNI_TRUE); \
H5_JNI_FATAL_ERROR(envptr, failErrMsg); \
} \
} while (0)
#define UNPIN_BOOL_ARRAY(envptr, pinnedArray, bufToRelease, freeMode) \
do { \
(*envptr)->ReleaseBooleanArrayElements(envptr, pinnedArray, (jboolean *)bufToRelease, freeMode); \
} while (0)
#define UNPIN_ARRAY_CRITICAL(envptr, pinnedArray, bufToRelease, freeMode) \
do { \
(*envptr)->ReleasePrimitiveArrayCritical(envptr, pinnedArray, bufToRelease, freeMode); \
} while (0)
/* Macros for string access */
#define PIN_JAVA_STRING(envptr, stringToPin, outString, isCopy, failErrMsg) \
do { \
if (NULL == (outString = (*envptr)->GetStringUTFChars(envptr, stringToPin, isCopy))) { \
CHECK_JNI_EXCEPTION(envptr, JNI_TRUE); \
H5_JNI_FATAL_ERROR(envptr, failErrMsg); \
} \
} while (0)
#define UNPIN_JAVA_STRING(envptr, pinnedString, stringToRelease) \
do { \
(*envptr)->ReleaseStringUTFChars(envptr, pinnedString, stringToRelease); \
} while (0)
/*
* Above String macros may be incorrect, suggested code for getting a cstr from java
* int jstr_to_cstr(JNIEnv *jenv, jstring j_str, char *c_str, size_t cstr_len)
* {
* int32_t j_len, c_len;
*
* c_len = (*jenv)->GetStringUTFLength(jenv, j_str);
* if (c_len > (int32_t)cstr_len)
* return -ENAMETOOLONG;
* j_len = (*jenv)->GetStringLength(jenv, j_str);
* (*jenv)->GetStringUTFRegion(jenv, j_str, 0, j_len, c_str);
* if ((*jenv)->ExceptionCheck(jenv))
* return -EIO;
* return 0;
* }
*
*/
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
extern jboolean h5JNIFatalError(JNIEnv *env, const char *);
extern jboolean h5nullArgument(JNIEnv *env, const char *);
extern jboolean h5badArgument(JNIEnv *env, const char *);
extern jboolean h5outOfMemory(JNIEnv *env, const char *);
extern jboolean h5assertion(JNIEnv *env, const char *);
extern jboolean h5unimplemented(JNIEnv *env, const char *);
extern jboolean h5libraryError(JNIEnv *env);
extern jboolean h5raiseException(JNIEnv *env, const char *, const char *);
/*
* The following macros are to facilitate immediate cleanup+return
* from a native JNI method when an exception is to be thrown.
* Since, in general, the "cleanup" methods are the only safe JNI
* methods to call once an exception has occurred, we want to immediately
* cleanup and return instead of letting the native method continue.
*
* Note that a native method can clear the exception when one occurs and
* then do its own error handling, but we instead opt to immediately return.
*/
#define H5_JNI_FATAL_ERROR(env, message) \
do { \
h5JNIFatalError(env, message); \
goto done; \
} while (0)
#define H5_NULL_ARGUMENT_ERROR(env, message) \
do { \
h5nullArgument(env, message); \
goto done; \
} while (0)
#define H5_BAD_ARGUMENT_ERROR(env, message) \
do { \
h5badArgument(env, message); \
goto done; \
} while (0)
#define H5_OUT_OF_MEMORY_ERROR(env, message) \
do { \
h5outOfMemory(env, message); \
goto done; \
} while (0)
#define H5_ASSERTION_ERROR(env, message) \
do { \
h5assertion(env, message); \
goto done; \
} while (0)
#define H5_UNIMPLEMENTED(env, message) \
do { \
h5unimplemented(env, message); \
goto done; \
} while (0)
#define H5_LIBRARY_ERROR(env) \
do { \
h5libraryError(env); \
goto done; \
} while (0)
#define H5_RAISE_EXCEPTION(env, message, exception) \
do { \
h5raiseException(env, message, exception); \
goto done; \
} while (0)
/* implemented at H5.c */
extern jint get_enum_value(JNIEnv *env, jobject enum_obj);
extern jobject get_enum_object(JNIEnv *env, const char *enum_class_name, jint enum_val,
const char *enum_field_desc);
/* implemented at H5G.c */
extern jobject create_H5G_info_t(JNIEnv *env, H5G_info_t group_info);
/* implemented at h5oimp.c */
extern jobject create_H5O_token_t(JNIEnv *env, const H5O_token_t *token, bool is_critical_pinning);
#ifdef __cplusplus
} /* end extern "C" */
#endif /* __cplusplus */
#endif /* Included_h5jni */
+912
View File
@@ -0,0 +1,912 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include <jni.h>
#include <stdlib.h>
#include "hdf5.h"
#include "h5jni.h"
#include "h5lImp.h"
/*
* Pointer to the JNI's Virtual Machine; used for callback functions.
*/
extern JavaVM *jvm;
typedef struct _cb_wrapper {
jobject visit_callback;
jobject op_data;
} cb_wrapper;
/********************/
/* Local Prototypes */
/********************/
static herr_t H5L_iterate_cb(hid_t g_id, const char *name, const H5L_info2_t *info, void *cb_data);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lcopy
* Signature: (JLjava/lang/String;JLjava/lang/String;JJ)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Lcopy(JNIEnv *env, jclass clss, jlong cur_loc_id, jstring cur_name, jlong dst_loc_id,
jstring dst_name, jlong create_id, jlong access_id)
{
const char *lCurName = NULL;
const char *lDstName = NULL;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == cur_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lcopy: src name is NULL");
if (NULL == dst_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lcopy: dest name is NULL");
PIN_JAVA_STRING(ENVONLY, cur_name, lCurName, NULL, "H5Lcopy: src name not pinned");
PIN_JAVA_STRING(ENVONLY, dst_name, lDstName, NULL, "H5Lcopy: dest name not pinned");
if ((status = H5Lcopy((hid_t)cur_loc_id, lCurName, (hid_t)dst_loc_id, lDstName, (hid_t)create_id,
(hid_t)access_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (lDstName)
UNPIN_JAVA_STRING(ENVONLY, dst_name, lDstName);
if (lCurName)
UNPIN_JAVA_STRING(ENVONLY, cur_name, lCurName);
} /* end Java_hdf_hdf5lib_H5_H5Lcopy */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lcreate_external
* Signature: (Ljava/lang/String;Ljava/lang/String;JLjava/lang/String;JJ)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Lcreate_1external(JNIEnv *env, jclass clss, jstring file_name, jstring cur_name,
jlong dst_loc_id, jstring dst_name, jlong create_id, jlong access_id)
{
const char *lFileName = NULL;
const char *lCurName = NULL;
const char *lDstName = NULL;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == file_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lcreate_external: file name is NULL");
if (NULL == cur_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lcreate_external: object name is NULL");
if (NULL == dst_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lcreate_external: link name is NULL");
PIN_JAVA_STRING(ENVONLY, file_name, lFileName, NULL, "H5Lcreate_external: file name not pinned");
PIN_JAVA_STRING(ENVONLY, cur_name, lCurName, NULL, "H5Lcreate_external: object name not pinned");
PIN_JAVA_STRING(ENVONLY, dst_name, lDstName, NULL, "H5Lcreate_external: link name not pinned");
if ((status = H5Lcreate_external(lFileName, lCurName, (hid_t)dst_loc_id, lDstName, (hid_t)create_id,
(hid_t)access_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (lDstName)
UNPIN_JAVA_STRING(ENVONLY, dst_name, lDstName);
if (lCurName)
UNPIN_JAVA_STRING(ENVONLY, cur_name, lCurName);
if (lFileName)
UNPIN_JAVA_STRING(ENVONLY, file_name, lFileName);
} /* end Java_hdf_hdf5lib_H5_H5Lcreate_1external */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lcreate_hard
* Signature: (JLjava/lang/String;JLjava/lang/String;JJ)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Lcreate_1hard(JNIEnv *env, jclass clss, jlong cur_loc_id, jstring cur_name,
jlong dst_loc_id, jstring dst_name, jlong create_id, jlong access_id)
{
const char *lCurName = NULL;
const char *lDstName = NULL;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == cur_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lcreate_hard: object name is NULL");
if (NULL == dst_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lcreate_hard: link name is NULL");
PIN_JAVA_STRING(ENVONLY, cur_name, lCurName, NULL, "H5Lcreate_hard: object name not pinned");
PIN_JAVA_STRING(ENVONLY, dst_name, lDstName, NULL, "H5Lcreate_hard: link name not pinned");
if ((status = H5Lcreate_hard((hid_t)cur_loc_id, lCurName, (hid_t)dst_loc_id, lDstName, (hid_t)create_id,
(hid_t)access_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (lDstName)
UNPIN_JAVA_STRING(ENVONLY, dst_name, lDstName);
if (lCurName)
UNPIN_JAVA_STRING(ENVONLY, cur_name, lCurName);
} /* end Java_hdf_hdf5lib_H5_H5Lcreate_1hard */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lcreate_soft
* Signature: (Ljava/lang/String;JLjava/lang/String;JJ)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Lcreate_1soft(JNIEnv *env, jclass clss, jstring cur_name, jlong dst_loc_id,
jstring dst_name, jlong create_id, jlong access_id)
{
const char *linkTarget = NULL;
const char *linkName = NULL;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == cur_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lcreate_soft: link target is NULL");
if (NULL == dst_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lcreate_soft: link name is NULL");
PIN_JAVA_STRING(ENVONLY, cur_name, linkTarget, NULL, "H5Lcreate_soft: link target not pinned");
PIN_JAVA_STRING(ENVONLY, dst_name, linkName, NULL, "H5Lcreate_soft: link name not pinned");
if ((status =
H5Lcreate_soft(linkTarget, (hid_t)dst_loc_id, linkName, (hid_t)create_id, (hid_t)access_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (linkName)
UNPIN_JAVA_STRING(ENVONLY, dst_name, linkName);
if (linkTarget)
UNPIN_JAVA_STRING(ENVONLY, cur_name, linkTarget);
} /* end Java_hdf_hdf5lib_H5_H5Lcreate_1soft */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Ldelete
* Signature: (JLjava/lang/String;J)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Ldelete(JNIEnv *env, jclass clss, jlong loc_id, jstring name, jlong access_id)
{
const char *linkName = NULL;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Ldelete: link name is NULL");
PIN_JAVA_STRING(ENVONLY, name, linkName, NULL, "H5Ldelete: link name not pinned");
if ((status = H5Ldelete((hid_t)loc_id, linkName, (hid_t)access_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (linkName)
UNPIN_JAVA_STRING(ENVONLY, name, linkName);
} /* end Java_hdf_hdf5lib_H5_H5Ldelete */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Ldelete_by_idx
* Signature: (JLjava/lang/String;IIJJ)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Ldelete_1by_1idx(JNIEnv *env, jclass clss, jlong loc_id, jstring name, jint index_field,
jint order, jlong link_n, jlong access_id)
{
const char *groupName = NULL;
hsize_t n = (hsize_t)link_n;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Ldelete_by_idx: group name is NULL");
PIN_JAVA_STRING(ENVONLY, name, groupName, NULL, "H5Ldelete_by_idx: group name not pinned");
if ((status = H5Ldelete_by_idx((hid_t)loc_id, groupName, (H5_index_t)index_field, (H5_iter_order_t)order,
n, (hid_t)access_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (groupName)
UNPIN_JAVA_STRING(ENVONLY, name, groupName);
} /* end Java_hdf_hdf5lib_H5_H5Ldelete_1by_1idx */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lexists
* Signature: (JLjava/lang/String;J)Z
*/
JNIEXPORT jboolean JNICALL
Java_hdf_hdf5lib_H5_H5Lexists(JNIEnv *env, jclass clss, jlong loc_id, jstring name, jlong access_id)
{
const char *linkName = NULL;
htri_t bval = JNI_FALSE;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lexists: link name is NULL");
PIN_JAVA_STRING(ENVONLY, name, linkName, NULL, "H5Lexists: link name not pinned");
if ((bval = H5Lexists((hid_t)loc_id, linkName, (hid_t)access_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
bval = (bval > 0) ? JNI_TRUE : JNI_FALSE;
done:
if (linkName)
UNPIN_JAVA_STRING(ENVONLY, name, linkName);
return (jboolean)bval;
} /* end Java_hdf_hdf5lib_H5_H5Lexists */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lget_info
* Signature: (JLjava/lang/String;J)Lhdf/hdf5lib/structs/H5L_info_t;
*/
JNIEXPORT jobject JNICALL
Java_hdf_hdf5lib_H5_H5Lget_1info(JNIEnv *env, jclass clss, jlong loc_id, jstring name, jlong access_id)
{
H5L_info2_t infobuf = {H5L_TYPE_ERROR, false, -1, H5T_CSET_ERROR, {{{0}}}};
const char *linkName = NULL;
jvalue args[5];
herr_t status = FAIL;
jobject ret_obj = NULL;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lget_info: link name is NULL");
PIN_JAVA_STRING(ENVONLY, name, linkName, NULL, "H5Lget_info: link name not pinned");
if ((status = H5Lget_info2((hid_t)loc_id, linkName, &infobuf, (hid_t)access_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
/*
* Set the last argument based upon whether this is a hard link (which returns object tokens)
* or a soft/user-defined link (which returns the link's value size). Then, call the appropriate
* constructor to instantiate an H5L_info_t object.
*/
if (infobuf.type == H5L_TYPE_HARD) {
jobject token;
/* Create an H5O_token_t object */
if (NULL == (token = create_H5O_token_t(ENVONLY, &infobuf.u.token, false)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
args[0].i = infobuf.type;
args[1].z = infobuf.corder_valid;
args[2].j = infobuf.corder;
args[3].i = infobuf.cset;
args[4].l = token;
CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5L_info_t",
"(IZJILhdf/hdf5lib/structs/H5O_token_t;)V", args, ret_obj);
}
else {
args[0].i = infobuf.type;
args[1].z = infobuf.corder_valid;
args[2].j = infobuf.corder;
args[3].i = infobuf.cset;
args[4].j = (jlong)infobuf.u.val_size;
CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5L_info_t", "(IZJIJ)V", args, ret_obj);
}
done:
if (linkName)
UNPIN_JAVA_STRING(ENVONLY, name, linkName);
return ret_obj;
} /* end Java_hdf_hdf5lib_H5_H5Lget_1info */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lget_info_by_idx
* Signature: (JLjava/lang/String;IIJJ)Lhdf/hdf5lib/structs/H5L_info_t;
*/
JNIEXPORT jobject JNICALL
Java_hdf_hdf5lib_H5_H5Lget_1info_1by_1idx(JNIEnv *env, jclass clss, jlong loc_id, jstring name,
jint index_field, jint order, jlong link_n, jlong access_id)
{
H5L_info2_t infobuf = {H5L_TYPE_ERROR, false, -1, H5T_CSET_ERROR, {{{0}}}};
const char *groupName = NULL;
jvalue args[5];
herr_t status = FAIL;
jobject ret_obj = NULL;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lget_info_by_idx: group name is NULL");
PIN_JAVA_STRING(ENVONLY, name, groupName, NULL, "H5Lget_info_by_idx: group name not pinned");
if ((status = H5Lget_info_by_idx2((hid_t)loc_id, groupName, (H5_index_t)index_field,
(H5_iter_order_t)order, (hsize_t)link_n, &infobuf, (hid_t)access_id)) <
0)
H5_LIBRARY_ERROR(ENVONLY);
/*
* Set the last argument based upon whether this is a hard link (which returns object tokens)
* or a soft/user-defined link (which returns the link's value size). Then, call the appropriate
* constructor to instantiate an H5L_info_t object.
*/
if (infobuf.type == H5L_TYPE_HARD) {
jobject token;
/* Create an H5O_token_t object */
if (NULL == (token = create_H5O_token_t(ENVONLY, &infobuf.u.token, false)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
args[0].i = infobuf.type;
args[1].z = infobuf.corder_valid;
args[2].j = infobuf.corder;
args[3].i = infobuf.cset;
args[4].l = token;
CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5L_info_t",
"(IZJILhdf/hdf5lib/structs/H5O_token_t;)V", args, ret_obj);
}
else {
args[0].i = infobuf.type;
args[1].z = infobuf.corder_valid;
args[2].j = infobuf.corder;
args[3].i = infobuf.cset;
args[4].j = (jlong)infobuf.u.val_size;
CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5L_info_t", "(IZJIJ)V", args, ret_obj);
}
done:
if (groupName)
UNPIN_JAVA_STRING(ENVONLY, name, groupName);
return ret_obj;
} /* end Java_hdf_hdf5lib_H5_H5Lget_1info_1by_1idx */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lget_name_by_idx
* Signature: (JLjava/lang/String;IIJJ)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
Java_hdf_hdf5lib_H5_H5Lget_1name_1by_1idx(JNIEnv *env, jclass clss, jlong loc_id, jstring name,
jint index_field, jint order, jlong link_n, jlong access_id)
{
const char *groupName = NULL;
jstring str = NULL;
ssize_t status_size = -1;
char *linkName = NULL;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lget_name_by_idx: group name is NULL");
PIN_JAVA_STRING(ENVONLY, name, groupName, NULL, "H5Lget_name_by_idx: group name not pinned");
/* Get the length of the link name */
if ((status_size =
H5Lget_name_by_idx((hid_t)loc_id, groupName, (H5_index_t)index_field, (H5_iter_order_t)order,
(hsize_t)link_n, (char *)NULL, (size_t)0, H5P_DEFAULT)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
/* add extra space for the null terminator */
if (NULL == (linkName = (char *)malloc(sizeof(char) * (size_t)status_size + 1)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Lget_name_by_idx: failed to allocate buffer for link name");
if ((H5Lget_name_by_idx((hid_t)loc_id, groupName, (H5_index_t)index_field, (H5_iter_order_t)order,
(hsize_t)link_n, (char *)linkName, (size_t)status_size + 1, (hid_t)access_id)) <
0)
H5_LIBRARY_ERROR(ENVONLY);
linkName[status_size] = '\0';
if (NULL == (str = ENVPTR->NewStringUTF(ENVONLY, linkName)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
done:
if (linkName)
free(linkName);
if (groupName)
UNPIN_JAVA_STRING(ENVONLY, name, groupName);
return str;
} /* end Java_hdf_hdf5lib_H5_H5Lget_1name_1by_1idx */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lget_value
* Signature: (JLjava/lang/String;[Ljava/lang/String;J)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Lget_1value(JNIEnv *env, jclass clss, jlong loc_id, jstring name,
jobjectArray link_value, jlong access_id)
{
H5L_info2_t infobuf = {H5L_TYPE_ERROR, false, -1, H5T_CSET_ERROR, {{{0}}}};
const char *file_name = NULL;
const char *obj_name = NULL;
const char *linkName = NULL;
jstring str;
herr_t status;
char *linkValue = NULL;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lget_value: link name is NULL");
infobuf.type = H5L_TYPE_ERROR;
PIN_JAVA_STRING(ENVONLY, name, linkName, NULL, "H5Lget_value: link name not pinned");
/* Get the length of the link value */
if ((status = H5Lget_info2((hid_t)loc_id, linkName, &infobuf, H5P_DEFAULT)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (H5L_TYPE_HARD == infobuf.type)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Lget_val: hard links are unsupported");
if (NULL == (linkValue = (char *)malloc(sizeof(char) * infobuf.u.val_size + 1)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Lget_val: failed to allocate buffer for link value");
if ((status = H5Lget_val((hid_t)loc_id, linkName, (void *)linkValue, infobuf.u.val_size + 1,
(hid_t)access_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
linkValue[infobuf.u.val_size] = '\0';
switch (infobuf.type) {
case H5L_TYPE_SOFT: {
if (NULL == (str = ENVPTR->NewStringUTF(ENVONLY, linkValue)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
ENVPTR->SetObjectArrayElement(ENVONLY, link_value, 0, str);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
break;
}
case H5L_TYPE_EXTERNAL: {
if ((status = H5Lunpack_elink_val(linkValue, (size_t)infobuf.u.val_size, (unsigned *)NULL,
&file_name, &obj_name)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (str = ENVPTR->NewStringUTF(ENVONLY, obj_name)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
ENVPTR->SetObjectArrayElement(ENVONLY, link_value, 0, str);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
if (NULL == (str = ENVPTR->NewStringUTF(ENVONLY, file_name)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
ENVPTR->SetObjectArrayElement(ENVONLY, link_value, 1, str);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
break;
}
case H5L_TYPE_ERROR:
case H5L_TYPE_MAX:
case H5L_TYPE_HARD:
default:
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Lget_val: invalid link type");
break;
}
done:
if (linkValue)
free(linkValue);
if (linkName)
UNPIN_JAVA_STRING(ENVONLY, name, linkName);
return infobuf.type;
} /* end Java_hdf_hdf5lib_H5_H5Lget_1val */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lget_value_by_idx
* Signature: (JLjava/lang/String;IIJ[Ljava/lang/String;J)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Lget_1value_1by_1idx(JNIEnv *env, jclass clss, jlong loc_id, jstring name,
jint index_field, jint order, jlong link_n,
jobjectArray link_value, jlong access_id)
{
H5L_info2_t infobuf = {H5L_TYPE_ERROR, false, -1, H5T_CSET_ERROR, {{{0}}}};
const char *file_name = NULL;
const char *obj_name = NULL;
const char *grpName = NULL;
jstring str;
herr_t status;
void *linkValue = NULL;
UNUSED(clss);
infobuf.type = H5L_TYPE_ERROR;
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lget_val_by_idx: group name is NULL");
PIN_JAVA_STRING(ENVONLY, name, grpName, NULL, "H5Lget_val_by_idx: group name not pinned");
/* Get the length of the link value */
if ((status = H5Lget_info_by_idx2((hid_t)loc_id, grpName, (H5_index_t)index_field, (H5_iter_order_t)order,
(hsize_t)link_n, &infobuf, (hid_t)access_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (H5L_TYPE_HARD == infobuf.type)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Lget_val_by_idx: hard links are unsupported");
if (!infobuf.u.val_size)
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (linkValue = (void *)malloc(infobuf.u.val_size + 1)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Lget_val_by_idx: failed to allocate buffer for link value");
if ((status = H5Lget_val_by_idx((hid_t)loc_id, grpName, (H5_index_t)index_field, (H5_iter_order_t)order,
(hsize_t)link_n, (void *)linkValue, infobuf.u.val_size + 1,
(hid_t)access_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
((char *)linkValue)[infobuf.u.val_size] = '\0';
switch (infobuf.type) {
case H5L_TYPE_SOFT: {
if (NULL == (str = ENVPTR->NewStringUTF(ENVONLY, (char *)linkValue)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
ENVPTR->SetObjectArrayElement(ENVONLY, link_value, 0, str);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
break;
}
case H5L_TYPE_EXTERNAL: {
if ((status = H5Lunpack_elink_val((char *)linkValue, (size_t)infobuf.u.val_size, (unsigned *)NULL,
(const char **)&file_name, (const char **)&obj_name)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (str = ENVPTR->NewStringUTF(ENVONLY, obj_name)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
ENVPTR->SetObjectArrayElement(ENVONLY, link_value, 0, str);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
if (NULL == (str = ENVPTR->NewStringUTF(ENVONLY, file_name)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
ENVPTR->SetObjectArrayElement(ENVONLY, link_value, 1, str);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
break;
}
case H5L_TYPE_ERROR:
case H5L_TYPE_MAX:
case H5L_TYPE_HARD:
default:
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Lget_val_by_idx: invalid link type");
break;
}
done:
if (linkValue)
free(linkValue);
if (grpName)
UNPIN_JAVA_STRING(ENVONLY, name, grpName);
return infobuf.type;
} /* end Java_hdf_hdf5lib_H5_H5Lget_1val_1by_1idx */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lmove
* Signature: (JLjava/lang/String;JLjava/lang/String;JJ)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Lmove(JNIEnv *env, jclass clss, jlong cur_loc_id, jstring cur_name, jlong dst_loc_id,
jstring dst_name, jlong create_id, jlong access_id)
{
const char *lCurName = NULL;
const char *lDstName = NULL;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == cur_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lmove: src name is NULL");
if (NULL == dst_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lmove: dest name is NULL");
PIN_JAVA_STRING(ENVONLY, cur_name, lCurName, NULL, "H5Lmove: src name not pinned");
PIN_JAVA_STRING(ENVONLY, dst_name, lDstName, NULL, "H5Lmove: dest name not pinned");
if ((status = H5Lmove((hid_t)cur_loc_id, lCurName, (hid_t)dst_loc_id, lDstName, (hid_t)create_id,
(hid_t)access_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (lDstName)
UNPIN_JAVA_STRING(ENVONLY, dst_name, lDstName);
if (lCurName)
UNPIN_JAVA_STRING(ENVONLY, cur_name, lCurName);
} /* end Java_hdf_hdf5lib_H5_H5Lmove */
/*
* Shim function for link iteration and link visiting which
*/
static herr_t
H5L_iterate_cb(hid_t g_id, const char *name, const H5L_info2_t *info, void *cb_data)
{
cb_wrapper *wrapper = (cb_wrapper *)cb_data;
jmethodID mid;
jobject cb_info_t = NULL;
jobject visit_callback = wrapper->visit_callback;
jstring str;
JNIEnv *cbenv = NULL;
jclass cbcls;
jvalue args[5];
void *op_data = (void *)wrapper->op_data;
jint status = -1;
if (JVMPTR->AttachCurrentThread(JVMPAR, (void **)&cbenv, NULL) < 0) {
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_TRUE);
H5_JNI_FATAL_ERROR(CBENVONLY, "H5L_iterate_cb: failed to attach current thread to JVM");
}
/* Get the Method ID for the "callback" function of the H5L_iterate_t class */
if (NULL == (cbcls = CBENVPTR->GetObjectClass(CBENVONLY, visit_callback)))
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_FALSE);
if (NULL == (mid = CBENVPTR->GetMethodID(CBENVONLY, cbcls, "callback",
"(JLjava/lang/String;Lhdf/hdf5lib/structs/H5L_info_t;Lhdf/"
"hdf5lib/callbacks/H5L_iterate_opdata_t;)I")))
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_FALSE);
if (NULL == (str = CBENVPTR->NewStringUTF(CBENVONLY, name)))
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_FALSE);
/*
* Set the last argument based upon whether this is a hard link (which returns object tokens)
* or a soft/user-defined link (which returns the link's value size). Then, call the appropriate
* constructor to instantiate an H5L_info_t object.
*/
if (info->type == H5L_TYPE_HARD) {
jobject token;
/* Create an H5O_token_t object */
if (NULL == (token = create_H5O_token_t(CBENVONLY, &info->u.token, false)))
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_FALSE);
args[0].i = info->type;
args[1].z = info->corder_valid;
args[2].j = info->corder;
args[3].i = info->cset;
args[4].l = token;
CALL_CONSTRUCTOR(CBENVONLY, "hdf/hdf5lib/structs/H5L_info_t",
"(IZJILhdf/hdf5lib/structs/H5O_token_t;)V", args, cb_info_t);
}
else {
args[0].i = info->type;
args[1].z = info->corder_valid;
args[2].j = info->corder;
args[3].i = info->cset;
args[4].j = (jlong)info->u.val_size;
CALL_CONSTRUCTOR(CBENVONLY, "hdf/hdf5lib/structs/H5L_info_t", "(IZJIJ)V", args, cb_info_t);
}
status = CBENVPTR->CallIntMethod(CBENVONLY, visit_callback, mid, g_id, str, cb_info_t, op_data);
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_FALSE);
done:
if (cbenv)
JVMPTR->DetachCurrentThread(JVMPAR);
return (herr_t)status;
} /* end H5L_iterate_cb */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lvisit
* Signature: (JIILjava/lang/Object;Ljava/lang/Object;)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Lvisit(JNIEnv *env, jclass clss, jlong grp_id, jint idx_type, jint order,
jobject callback_op, jobject op_data)
{
cb_wrapper wrapper = {callback_op, op_data};
herr_t status = FAIL;
UNUSED(clss);
ENVPTR->GetJavaVM(ENVONLY, &jvm);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
if (NULL == op_data)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lvisit: op_data is NULL");
if (NULL == callback_op)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lvisit: callback_op is NULL");
if ((status = H5Lvisit2((hid_t)grp_id, (H5_index_t)idx_type, (H5_iter_order_t)order, H5L_iterate_cb,
(void *)&wrapper)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return status;
} /* end Java_hdf_hdf5lib_H5_H5Lvisit */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lvisit_by_name
* Signature: (JLjava/lang/String;IILjava/lang/Object;Ljava/lang/Object;J)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Lvisit_1by_1name(JNIEnv *env, jclass clss, jlong grp_id, jstring name, jint idx_type,
jint order, jobject callback_op, jobject op_data, jlong access_id)
{
cb_wrapper wrapper = {callback_op, op_data};
const char *grpName = NULL;
herr_t status = FAIL;
UNUSED(clss);
ENVPTR->GetJavaVM(ENVONLY, &jvm);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
if (NULL == op_data)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lvisit_by_name: op_data is NULL");
if (NULL == callback_op)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lvisit_by_name: callback_op is NULL");
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lvisit_by_name: group name is NULL");
PIN_JAVA_STRING(ENVONLY, name, grpName, NULL, "H5Lvisit_by_name: group name not pinned");
if ((status = H5Lvisit_by_name2((hid_t)grp_id, grpName, (H5_index_t)idx_type, (H5_iter_order_t)order,
H5L_iterate_cb, (void *)&wrapper, (hid_t)access_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (grpName)
UNPIN_JAVA_STRING(ENVONLY, name, grpName);
return status;
} /* end Java_hdf_hdf5lib_H5_H5Lvisit_1by_1name */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Literate
* Signature: (JIIJLjava/lang/Object;Ljava/lang/Object;)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Literate(JNIEnv *env, jclass clss, jlong grp_id, jint idx_type, jint order, jlong idx,
jobject callback_op, jobject op_data)
{
cb_wrapper wrapper = {callback_op, op_data};
hsize_t start_idx = (hsize_t)idx;
herr_t status = FAIL;
UNUSED(clss);
ENVPTR->GetJavaVM(ENVONLY, &jvm);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
if (NULL == op_data)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Literate: op_data is NULL");
if (NULL == callback_op)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Literate: callback_op is NULL");
if ((status = H5Literate2((hid_t)grp_id, (H5_index_t)idx_type, (H5_iter_order_t)order, &start_idx,
H5L_iterate_cb, (void *)&wrapper)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return status;
} /* end Java_hdf_hdf5lib_H5_H5Literate */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Literate_by_name
* Signature: (JLjava/lang/String;IIJLjava/lang/Object;Ljava/lang/Object;J)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Literate_1by_1name(JNIEnv *env, jclass clss, jlong grp_id, jstring name, jint idx_type,
jint order, jlong idx, jobject callback_op, jobject op_data,
jlong access_id)
{
cb_wrapper wrapper = {callback_op, op_data};
const char *groupName = NULL;
hsize_t start_idx = (hsize_t)idx;
herr_t status = FAIL;
UNUSED(clss);
ENVPTR->GetJavaVM(ENVONLY, &jvm);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
if (NULL == op_data)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Literate_by_name: op_data is NULL");
if (NULL == callback_op)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Literate_by_name: callback_op is NULL");
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Literate_by_name: group name is NULL");
PIN_JAVA_STRING(ENVONLY, name, groupName, NULL, "H5Literate_by_name: group name not pinned");
if ((status = H5Literate_by_name2((hid_t)grp_id, groupName, (H5_index_t)idx_type, (H5_iter_order_t)order,
&start_idx, H5L_iterate_cb, (void *)&wrapper, (hid_t)access_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (groupName)
UNPIN_JAVA_STRING(ENVONLY, name, groupName);
return status;
} /* end Java_hdf_hdf5lib_H5_H5Literate_1by_1name */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lis_registered
* Signature: (I)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Lis_1registered(JNIEnv *env, jclass clss, jint link_cls_id)
{
htri_t ret_val = FAIL;
UNUSED(clss);
if ((ret_val = H5Lis_registered((H5L_type_t)link_cls_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (int)ret_val;
} /* end Java_hdf_hdf5lib_H5_H5Lis_1registered */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lunregister
* Signature: (I)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Lunregister(JNIEnv *env, jclass clss, jint link_cls_id)
{
UNUSED(clss);
if (H5Lunregister((H5L_type_t)link_cls_id) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return;
} /* end Java_hdf_hdf5lib_H5_H5Lunregister */
#ifdef __cplusplus
} /* end extern "C" */
#endif /* __cplusplus */
+173
View File
@@ -0,0 +1,173 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <jni.h>
/* Header for class hdf_hdf5lib_H5_H5_H5L */
#ifndef Included_hdf_hdf5lib_H5_H5L
#define Included_hdf_hdf5lib_H5_H5L
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lcopy
* Signature: (JLjava/lang/String;JLjava/lang/String;JJ)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Lcopy(JNIEnv *, jclass, jlong, jstring, jlong, jstring, jlong,
jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lcreate_external
* Signature: (Ljava/lang/String;Ljava/lang/String;JLjava/lang/String;JJ)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Lcreate_1external(JNIEnv *, jclass, jstring, jstring, jlong,
jstring, jlong, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lcreate_hard
* Signature: (JLjava/lang/String;JLjava/lang/String;JJ)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Lcreate_1hard(JNIEnv *, jclass, jlong, jstring, jlong, jstring,
jlong, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lcreate_soft
* Signature: (Ljava/lang/String;JLjava/lang/String;JJ)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Lcreate_1soft(JNIEnv *, jclass, jstring, jlong, jstring, jlong,
jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Ldelete
* Signature: (JLjava/lang/String;J)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Ldelete(JNIEnv *, jclass, jlong, jstring, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Ldelete_by_idx
* Signature: (JLjava/lang/String;IIJJ)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Ldelete_1by_1idx(JNIEnv *, jclass, jlong, jstring, jint, jint,
jlong, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lexists
* Signature: (JLjava/lang/String;J)Z
*/
JNIEXPORT jboolean JNICALL Java_hdf_hdf5lib_H5_H5Lexists(JNIEnv *, jclass, jlong, jstring, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lget_info
* Signature: (JLjava/lang/String;J)Lhdf/hdf5lib/structs/H5L_info_t;
*/
JNIEXPORT jobject JNICALL Java_hdf_hdf5lib_H5_H5Lget_1info(JNIEnv *, jclass, jlong, jstring, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lget_info_by_idx
* Signature: (JLjava/lang/String;IIJJ)Lhdf/hdf5lib/structs/H5L_info_t;
*/
JNIEXPORT jobject JNICALL Java_hdf_hdf5lib_H5_H5Lget_1info_1by_1idx(JNIEnv *, jclass, jlong, jstring, jint,
jint, jlong, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lget_name_by_idx
* Signature: (JLjava/lang/String;IIJJ)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_hdf_hdf5lib_H5_H5Lget_1name_1by_1idx(JNIEnv *, jclass, jlong, jstring, jint,
jint, jlong, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lget_value
* Signature: (JLjava/lang/String;[Ljava/lang/String;J)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Lget_1value(JNIEnv *, jclass, jlong, jstring, jobjectArray,
jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lget_value_by_idx
* Signature: (JLjava/lang/String;IIJ[Ljava/lang/String;J)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Lget_1value_1by_1idx(JNIEnv *, jclass, jlong, jstring, jint,
jint, jlong, jobjectArray, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lmove
* Signature: (JLjava/lang/String;JLjava/lang/String;JJ)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Lmove(JNIEnv *, jclass, jlong, jstring, jlong, jstring, jlong,
jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lvisit
* Signature: (JIILjava/lang/Object;Ljava/lang/Object;)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Lvisit(JNIEnv *, jclass, jlong, jint, jint, jobject, jobject);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lvisit_by_name
* Signature: (JLjava/lang/String;IILjava/lang/Object;Ljava/lang/Object;J)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Lvisit_1by_1name(JNIEnv *, jclass, jlong, jstring, jint, jint,
jobject, jobject, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Literate
* Signature: (JIIJLjava/lang/Object;Ljava/lang/Object;)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Literate(JNIEnv *, jclass, jlong, jint, jint, jlong, jobject,
jobject);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Literate_by_name
* Signature: (JLjava/lang/String;IIJLjava/lang/Object;Ljava/lang/Object;J)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Literate_1by_1name(JNIEnv *, jclass, jlong, jstring, jint, jint,
jlong, jobject, jobject, jlong);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lis_registered
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Lis_1registered(JNIEnv *, jclass, jint);
/*
* Class: hdf_hdf5lib_H5
* Method: H5Lunregister
* Signature: (I)V
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Lunregister(JNIEnv *, jclass, jint);
#ifdef __cplusplus
} /* end extern "C" */
#endif /* __cplusplus */
#endif /* Included_hdf_hdf5lib_H5_H5L */
+1050
View File
@@ -0,0 +1,1050 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the LICENSE file, which can be found at the root of the source code *
* distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include <stdlib.h>
#include "hdf5.h"
#include "h5jni.h"
#include "h5oImp.h"
/*
* Pointer to the JNI's Virtual Machine; used for callback functions.
*/
extern JavaVM *jvm;
typedef struct _cb_wrapper {
jobject visit_callback;
jobject op_data;
} cb_wrapper;
/********************/
/* Local Prototypes */
/********************/
static herr_t H5O_iterate_cb(hid_t g_id, const char *name, const H5O_info2_t *info, void *cb_data);
/*
* Create a java object of hdf.hdf5lib.structs.H5O_token_t.
*/
jobject
create_H5O_token_t(JNIEnv *envptr, const H5O_token_t *token, bool is_critical_pinning)
{
jbyteArray tokenByteBuf;
jboolean token_buf_is_copy;
jvalue constructor_args[1];
jbyte *token_buf = NULL;
jobject ret_token_obj = NULL;
if (NULL == (tokenByteBuf = (*envptr)->NewByteArray(envptr, H5O_MAX_TOKEN_SIZE)))
CHECK_JNI_EXCEPTION(envptr, JNI_FALSE);
if (is_critical_pinning)
PIN_BYTE_ARRAY_CRITICAL(envptr, tokenByteBuf, token_buf, &token_buf_is_copy,
"create_H5O_token_t: object token buffer not pinned");
else
PIN_BYTE_ARRAY(envptr, tokenByteBuf, token_buf, &token_buf_is_copy,
"create_H5O_token_t: object token buffer not pinned");
memcpy(token_buf, token, sizeof(H5O_token_t));
if (is_critical_pinning)
UNPIN_ARRAY_CRITICAL(envptr, tokenByteBuf, token_buf, 0);
else
UNPIN_BYTE_ARRAY(envptr, tokenByteBuf, token_buf, 0);
token_buf = NULL;
constructor_args[0].l = tokenByteBuf;
CALL_CONSTRUCTOR(envptr, "hdf/hdf5lib/structs/H5O_token_t", "([B)V", constructor_args, ret_token_obj);
/*
* If critical pinning is being used, this routine is probably being
* called within a loop, so we'll clean up local references.
*/
if (is_critical_pinning)
(*envptr)->DeleteLocalRef(envptr, tokenByteBuf);
done:
if (token_buf) {
if (is_critical_pinning)
UNPIN_ARRAY_CRITICAL(envptr, tokenByteBuf, token_buf, JNI_ABORT);
else
UNPIN_BYTE_ARRAY(envptr, tokenByteBuf, token_buf, JNI_ABORT);
} /* end if */
return ret_token_obj;
} /* end create_H5O_token_t */
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Oopen
* Signature: (JLjava/lang/String;J)J
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Oopen(JNIEnv *env, jclass clss, jlong loc_id, jstring name, jlong access_plist_id)
{
const char *objName = NULL;
hid_t status = H5I_INVALID_HID;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Oopen: object name is NULL");
PIN_JAVA_STRING(ENVONLY, name, objName, NULL, "H5Oopen: object name not pinned");
if ((status = H5Oopen((hid_t)loc_id, objName, (hid_t)access_plist_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (objName)
UNPIN_JAVA_STRING(ENVONLY, name, objName);
return (jlong)status;
} /* end Java_hdf_hdf5lib_H5__1H5Oopen */
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Oclose
* Signature: (J)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5__1H5Oclose(JNIEnv *env, jclass clss, jlong object_id)
{
herr_t retVal = FAIL;
UNUSED(clss);
if ((retVal = H5Oclose((hid_t)object_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return (jint)retVal;
} /* end Java_hdf_hdf5lib_H5__1H5Oclose */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Ocopy
* Signature: (JLjava/lang/String;JLjava/lang/String;JJ)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Ocopy(JNIEnv *env, jclass clss, jlong cur_loc_id, jstring cur_name, jlong dst_loc_id,
jstring dst_name, jlong create_id, jlong access_id)
{
const char *lCurName = NULL;
const char *lDstName = NULL;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == cur_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Ocopy: src name is NULL");
if (NULL == dst_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Ocopy: dst name is NULL");
PIN_JAVA_STRING(ENVONLY, cur_name, lCurName, NULL, "H5Ocopy: src name not pinned");
PIN_JAVA_STRING(ENVONLY, dst_name, lDstName, NULL, "H5Ocopy: dest name not pinned");
if ((status = H5Ocopy((hid_t)cur_loc_id, lCurName, (hid_t)dst_loc_id, lDstName, (hid_t)create_id,
(hid_t)access_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (lDstName)
UNPIN_JAVA_STRING(ENVONLY, dst_name, lDstName);
if (lCurName)
UNPIN_JAVA_STRING(ENVONLY, cur_name, lCurName);
} /* end Java_hdf_hdf5lib_H5_H5Ocopy */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Oget_info
* Signature: (JI)Lhdf/hdf5lib/structs/H5O_info_t;
*/
JNIEXPORT jobject JNICALL
Java_hdf_hdf5lib_H5_H5Oget_1info(JNIEnv *env, jclass clss, jlong loc_id, jint fields)
{
H5O_info2_t infobuf;
jobject token;
jvalue args[9];
herr_t status = FAIL;
jobject ret_obj = NULL;
UNUSED(clss);
if ((status = H5Oget_info3((hid_t)loc_id, &infobuf, (unsigned)fields)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (NULL == (token = create_H5O_token_t(ENVONLY, &infobuf.token, false)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
args[0].j = (jlong)infobuf.fileno;
args[1].l = token;
args[2].i = infobuf.type;
args[3].i = (jint)infobuf.rc;
args[4].j = infobuf.atime;
args[5].j = infobuf.mtime;
args[6].j = infobuf.ctime;
args[7].j = infobuf.btime;
args[8].j = (jlong)infobuf.num_attrs;
CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5O_info_t",
"(JLhdf/hdf5lib/structs/H5O_token_t;IIJJJJJ)V", args, ret_obj);
done:
return ret_obj;
} /* end Java_hdf_hdf5lib_H5_H5Oget_1info */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Oget_info_by_name
* Signature: (JLjava/lang/String;IJ)Lhdf/hdf5lib/structs/H5O_info_t;
*/
JNIEXPORT jobject JNICALL
Java_hdf_hdf5lib_H5_H5Oget_1info_1by_1name(JNIEnv *env, jclass clss, jlong loc_id, jstring name, jint fields,
jlong access_id)
{
H5O_info2_t infobuf;
const char *objName = NULL;
jobject token;
jvalue args[9];
herr_t status = FAIL;
jobject ret_obj = NULL;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Oget_info_by_name: object name is NULL");
PIN_JAVA_STRING(ENVONLY, name, objName, NULL, "H5Oget_info_by_name: object name not pinned");
if ((status =
H5Oget_info_by_name3((hid_t)loc_id, objName, &infobuf, (unsigned)fields, (hid_t)access_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
/* Create an H5O_token_t object */
if (NULL == (token = create_H5O_token_t(ENVONLY, &infobuf.token, false)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
args[0].j = (jlong)infobuf.fileno;
args[1].l = token;
args[2].i = infobuf.type;
args[3].i = (jint)infobuf.rc;
args[4].j = infobuf.atime;
args[5].j = infobuf.mtime;
args[6].j = infobuf.ctime;
args[7].j = infobuf.btime;
args[8].j = (jlong)infobuf.num_attrs;
CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5O_info_t",
"(JLhdf/hdf5lib/structs/H5O_token_t;IIJJJJJ)V", args, ret_obj);
done:
if (objName)
UNPIN_JAVA_STRING(ENVONLY, name, objName);
return ret_obj;
} /* end Java_hdf_hdf5lib_H5_H5Oget_1info_1by_1name */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Oget_info_by_idx
* Signature: (JLjava/lang/String;IIJIJ)Lhdf/hdf5lib/structs/H5O_info_t;
*/
JNIEXPORT jobject JNICALL
Java_hdf_hdf5lib_H5_H5Oget_1info_1by_1idx(JNIEnv *env, jclass clss, jlong loc_id, jstring name,
jint index_field, jint order, jlong link_n, jint fields,
jlong access_id)
{
H5O_info2_t infobuf;
const char *grpName = NULL;
jobject token;
jvalue args[9];
herr_t status = FAIL;
jobject ret_obj = NULL;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Oget_info_by_idx: group name is NULL");
PIN_JAVA_STRING(ENVONLY, name, grpName, NULL, "H5Oget_info_by_idx: group name not pinned");
if ((status = H5Oget_info_by_idx3((hid_t)loc_id, grpName, (H5_index_t)index_field, (H5_iter_order_t)order,
(hsize_t)link_n, &infobuf, (unsigned)fields, (hid_t)access_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
/* Create an H5O_token_t object */
if (NULL == (token = create_H5O_token_t(ENVONLY, &infobuf.token, false)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
args[0].j = (jlong)infobuf.fileno;
args[1].l = token;
args[2].i = infobuf.type;
args[3].i = (jint)infobuf.rc;
args[4].j = infobuf.atime;
args[5].j = infobuf.mtime;
args[6].j = infobuf.ctime;
args[7].j = infobuf.btime;
args[8].j = (jlong)infobuf.num_attrs;
CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5O_info_t",
"(JLhdf/hdf5lib/structs/H5O_token_t;IIJJJJJ)V", args, ret_obj);
done:
if (grpName)
UNPIN_JAVA_STRING(ENVONLY, name, grpName);
return ret_obj;
} /* end Java_hdf_hdf5lib_H5_H5Oget_1info_1by_1idx */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Oget_native_info
* Signature: (JI)Lhdf/hdf5lib/structs/H5O_native_info_t;
*/
JNIEXPORT jobject JNICALL
Java_hdf_hdf5lib_H5_H5Oget_1native_1info(JNIEnv *env, jclass clss, jlong loc_id, jint fields)
{
H5O_native_info_t infobuf;
jobject hdrinfobuf;
jobject obj_ihinfobuf;
jobject attr_ihinfobuf;
jvalue args[10];
herr_t status = FAIL;
jobject ret_obj = NULL;
UNUSED(clss);
if ((status = H5Oget_native_info((hid_t)loc_id, &infobuf, (unsigned)fields)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
args[0].i = (jint)infobuf.hdr.version;
args[1].i = (jint)infobuf.hdr.nmesgs;
args[2].i = (jint)infobuf.hdr.nchunks;
args[3].i = (jint)infobuf.hdr.flags;
args[4].j = (jlong)infobuf.hdr.space.total;
args[5].j = (jlong)infobuf.hdr.space.meta;
args[6].j = (jlong)infobuf.hdr.space.mesg;
args[7].j = (jlong)infobuf.hdr.space.free;
args[8].j = (jlong)infobuf.hdr.mesg.present;
args[9].j = (jlong)infobuf.hdr.mesg.shared;
CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5O_hdr_info_t", "(IIIIJJJJJJ)V", args, ret_obj);
hdrinfobuf = ret_obj;
args[0].j = (jlong)infobuf.meta_size.obj.index_size;
args[1].j = (jlong)infobuf.meta_size.obj.heap_size;
CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5_ih_info_t", "(JJ)V", args, ret_obj);
obj_ihinfobuf = ret_obj;
args[0].j = (jlong)infobuf.meta_size.attr.index_size;
args[1].j = (jlong)infobuf.meta_size.attr.heap_size;
CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5_ih_info_t", "(JJ)V", args, ret_obj);
attr_ihinfobuf = ret_obj;
args[0].l = hdrinfobuf;
args[1].l = obj_ihinfobuf;
args[2].l = attr_ihinfobuf;
CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5O_native_info_t",
"(Lhdf/hdf5lib/structs/H5O_hdr_info_t;Lhdf/hdf5lib/structs/H5_ih_info_t;Lhdf/hdf5lib/"
"structs/H5_ih_info_t;)V",
args, ret_obj);
done:
return ret_obj;
} /* end Java_hdf_hdf5lib_H5_H5Oget_1native_1info */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Oget_native_info_by_name
* Signature: (JLjava/lang/String;IJ)Lhdf/hdf5lib/structs/H5O_native_info_t;
*/
JNIEXPORT jobject JNICALL
Java_hdf_hdf5lib_H5_H5Oget_1native_1info_1by_1name(JNIEnv *env, jclass clss, jlong loc_id, jstring name,
jint fields, jlong access_id)
{
H5O_native_info_t infobuf;
const char *objName = NULL;
jobject hdrinfobuf;
jobject obj_ihinfobuf;
jobject attr_ihinfobuf;
jvalue args[10];
herr_t status = FAIL;
jobject ret_obj = NULL;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Oget_native_info_by_name: object name is NULL");
PIN_JAVA_STRING(ENVONLY, name, objName, NULL, "H5Oget_native_info_by_name: object name not pinned");
if ((status = H5Oget_native_info_by_name((hid_t)loc_id, objName, &infobuf, (unsigned)fields,
(hid_t)access_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
args[0].i = (jint)infobuf.hdr.version;
args[1].i = (jint)infobuf.hdr.nmesgs;
args[2].i = (jint)infobuf.hdr.nchunks;
args[3].i = (jint)infobuf.hdr.flags;
args[4].j = (jlong)infobuf.hdr.space.total;
args[5].j = (jlong)infobuf.hdr.space.meta;
args[6].j = (jlong)infobuf.hdr.space.mesg;
args[7].j = (jlong)infobuf.hdr.space.free;
args[8].j = (jlong)infobuf.hdr.mesg.present;
args[9].j = (jlong)infobuf.hdr.mesg.shared;
CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5O_hdr_info_t", "(IIIIJJJJJJ)V", args, ret_obj);
hdrinfobuf = ret_obj;
args[0].j = (jlong)infobuf.meta_size.obj.index_size;
args[1].j = (jlong)infobuf.meta_size.obj.heap_size;
CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5_ih_info_t", "(JJ)V", args, ret_obj);
obj_ihinfobuf = ret_obj;
args[0].j = (jlong)infobuf.meta_size.attr.index_size;
args[1].j = (jlong)infobuf.meta_size.attr.heap_size;
CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5_ih_info_t", "(JJ)V", args, ret_obj);
attr_ihinfobuf = ret_obj;
args[0].l = hdrinfobuf;
args[1].l = obj_ihinfobuf;
args[2].l = attr_ihinfobuf;
CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5O_native_info_t",
"(Lhdf/hdf5lib/structs/H5O_hdr_info_t;Lhdf/hdf5lib/structs/H5_ih_info_t;Lhdf/hdf5lib/"
"structs/H5_ih_info_t;)V",
args, ret_obj);
done:
if (objName)
UNPIN_JAVA_STRING(ENVONLY, name, objName);
return ret_obj;
} /* end Java_hdf_hdf5lib_H5_H5Oget_1native_1info_1by_1name */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Oget_native_info_by_idx
* Signature: (JLjava/lang/String;IIJIJ)Lhdf/hdf5lib/structs/H5O_native_info_t;
*/
JNIEXPORT jobject JNICALL
Java_hdf_hdf5lib_H5_H5Oget_1native_1info_1by_1idx(JNIEnv *env, jclass clss, jlong loc_id, jstring name,
jint index_field, jint order, jlong link_n, jint fields,
jlong access_id)
{
H5O_native_info_t infobuf;
const char *grpName = NULL;
jobject hdrinfobuf;
jobject obj_ihinfobuf;
jobject attr_ihinfobuf;
jvalue args[10];
herr_t status = FAIL;
jobject ret_obj = NULL;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Oget_native_info_by_idx: group name is NULL");
PIN_JAVA_STRING(ENVONLY, name, grpName, NULL, "H5Oget_native_info_by_idx: group name not pinned");
if ((status = H5Oget_native_info_by_idx((hid_t)loc_id, grpName, (H5_index_t)index_field,
(H5_iter_order_t)order, (hsize_t)link_n, &infobuf,
(unsigned)fields, (hid_t)access_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
args[0].i = (jint)infobuf.hdr.version;
args[1].i = (jint)infobuf.hdr.nmesgs;
args[2].i = (jint)infobuf.hdr.nchunks;
args[3].i = (jint)infobuf.hdr.flags;
args[4].j = (jlong)infobuf.hdr.space.total;
args[5].j = (jlong)infobuf.hdr.space.meta;
args[6].j = (jlong)infobuf.hdr.space.mesg;
args[7].j = (jlong)infobuf.hdr.space.free;
args[8].j = (jlong)infobuf.hdr.mesg.present;
args[9].j = (jlong)infobuf.hdr.mesg.shared;
CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5O_hdr_info_t", "(IIIIJJJJJJ)V", args, ret_obj);
hdrinfobuf = ret_obj;
args[0].j = (jlong)infobuf.meta_size.obj.index_size;
args[1].j = (jlong)infobuf.meta_size.obj.heap_size;
CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5_ih_info_t", "(JJ)V", args, ret_obj);
obj_ihinfobuf = ret_obj;
args[0].j = (jlong)infobuf.meta_size.attr.index_size;
args[1].j = (jlong)infobuf.meta_size.attr.heap_size;
CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5_ih_info_t", "(JJ)V", args, ret_obj);
attr_ihinfobuf = ret_obj;
args[0].l = hdrinfobuf;
args[1].l = obj_ihinfobuf;
args[2].l = attr_ihinfobuf;
CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5O_native_info_t",
"(Lhdf/hdf5lib/structs/H5O_hdr_info_t;Lhdf/hdf5lib/structs/H5_ih_info_t;Lhdf/hdf5lib/"
"structs/H5_ih_info_t;)V",
args, ret_obj);
done:
if (grpName)
UNPIN_JAVA_STRING(ENVONLY, name, grpName);
return ret_obj;
} /* end Java_hdf_hdf5lib_H5_H5Oget_1native_1info_1by_1idx */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Olink
* Signature: (JJLjava/lang/String;JJ)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Olink(JNIEnv *env, jclass clss, jlong cur_loc_id, jlong dst_loc_id, jstring dst_name,
jlong create_id, jlong access_id)
{
const char *linkDstName = NULL;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == dst_name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Olink: link destination name is NULL");
PIN_JAVA_STRING(ENVONLY, dst_name, linkDstName, NULL, "H5Olink: link destination name not pinned");
if ((status = H5Olink((hid_t)cur_loc_id, (hid_t)dst_loc_id, linkDstName, (hid_t)create_id,
(hid_t)access_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (linkDstName)
UNPIN_JAVA_STRING(ENVONLY, dst_name, linkDstName);
} /* end Java_hdf_hdf5lib_H5_H5Olink */
static herr_t
H5O_iterate_cb(hid_t g_id, const char *name, const H5O_info2_t *info, void *cb_data)
{
cb_wrapper *wrapper = (cb_wrapper *)cb_data;
jmethodID mid;
jobject cb_info_t = NULL;
jobject visit_callback = wrapper->visit_callback;
jobject token;
jstring str;
JNIEnv *cbenv = NULL;
jclass cbcls;
jvalue args[12];
void *op_data = (void *)wrapper->op_data;
jint status = FAIL;
if (JVMPTR->AttachCurrentThread(JVMPAR, (void **)&cbenv, NULL) < 0) {
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_TRUE);
H5_JNI_FATAL_ERROR(CBENVONLY, "H5O_iterate_cb: failed to attach current thread to JVM");
}
if (NULL == (cbcls = CBENVPTR->GetObjectClass(CBENVONLY, visit_callback)))
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_FALSE);
if (NULL == (mid = CBENVPTR->GetMethodID(CBENVONLY, cbcls, "callback",
"(JLjava/lang/String;Lhdf/hdf5lib/structs/H5O_info_t;Lhdf/"
"hdf5lib/callbacks/H5O_iterate_opdata_t;)I")))
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_FALSE);
if (NULL == (str = CBENVPTR->NewStringUTF(CBENVONLY, name)))
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_FALSE);
/* Create an H5O_token_t object */
if (NULL == (token = create_H5O_token_t(CBENVONLY, &info->token, false)))
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_FALSE);
args[0].j = (jlong)info->fileno;
args[1].l = token;
args[2].i = info->type;
args[3].i = (jint)info->rc;
args[4].j = info->atime;
args[5].j = info->mtime;
args[6].j = info->ctime;
args[7].j = info->btime;
args[8].j = (jlong)info->num_attrs;
/* Get a reference to the H5O_info_t class */
CALL_CONSTRUCTOR(CBENVONLY, "hdf/hdf5lib/structs/H5O_info_t",
"(JLhdf/hdf5lib/structs/H5O_token_t;IIJJJJJ)V", args, cb_info_t);
status = CBENVPTR->CallIntMethod(CBENVONLY, visit_callback, mid, g_id, str, cb_info_t, op_data);
CHECK_JNI_EXCEPTION(CBENVONLY, JNI_FALSE);
done:
if (cbenv)
JVMPTR->DetachCurrentThread(JVMPAR);
return (herr_t)status;
} /* end H5O_iterate_cb */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Ovisit
* Signature: (JIILjava/lang/Object;Ljava/lang/Object;I)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Ovisit(JNIEnv *env, jclass clss, jlong grp_id, jint idx_type, jint order,
jobject callback_op, jobject op_data, jint fields)
{
cb_wrapper wrapper = {callback_op, op_data};
herr_t status = FAIL;
UNUSED(clss);
ENVPTR->GetJavaVM(ENVONLY, &jvm);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
if (NULL == op_data)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Ovisit: op_data is NULL");
if (NULL == callback_op)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Ovisit: callback_op is NULL");
if ((status = H5Ovisit3((hid_t)grp_id, (H5_index_t)idx_type, (H5_iter_order_t)order, H5O_iterate_cb,
(void *)&wrapper, (unsigned)fields)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return status;
} /* end Java_hdf_hdf5lib_H5_H5Ovisit */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Ovisit_by_name
* Signature: (JLjava/lang/String;IILjava/lang/Object;Ljava/lang/Object;IJ)I
*/
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Ovisit_1by_1name(JNIEnv *env, jclass clss, jlong grp_id, jstring name, jint idx_type,
jint order, jobject callback_op, jobject op_data, jint fields,
jlong access_id)
{
cb_wrapper wrapper = {callback_op, op_data};
const char *objName = NULL;
herr_t status = FAIL;
UNUSED(clss);
ENVPTR->GetJavaVM(ENVONLY, &jvm);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
if (NULL == op_data)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Ovisit_by_name: op_data is NULL");
if (NULL == callback_op)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Ovisit_by_name: callback_op is NULL");
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Ovisit_by_name: object name is NULL");
PIN_JAVA_STRING(ENVONLY, name, objName, NULL, "H5Ovisit_by_name: object name not pinned");
if ((status = H5Ovisit_by_name3((hid_t)grp_id, objName, (H5_index_t)idx_type, (H5_iter_order_t)order,
H5O_iterate_cb, (void *)&wrapper, (unsigned)fields, (hid_t)access_id)) <
0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (objName)
UNPIN_JAVA_STRING(ENVONLY, name, objName);
return status;
} /* end Java_hdf_hdf5lib_H5_H5Ovisit_1by_1name */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Oset_comment
* Signature: (JLjava/lang/String;)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Oset_1comment(JNIEnv *env, jclass clss, jlong loc_id, jstring comment)
{
const char *oComment = NULL;
herr_t status = FAIL;
UNUSED(clss);
if (NULL != comment)
PIN_JAVA_STRING(ENVONLY, comment, oComment, NULL, "H5Oset_comment: object comment not pinned");
if ((status = H5Oset_comment((hid_t)loc_id, oComment)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (oComment)
UNPIN_JAVA_STRING(ENVONLY, comment, oComment);
} /* end Java_hdf_hdf5lib_H5_H5Oset_1comment */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Oset_comment_by_name
* Signature: (JLjava/lang/String;Ljava/lang/String;J)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Oset_1comment_1by_1name(JNIEnv *env, jclass clss, jlong loc_id, jstring name,
jstring comment, jlong access_id)
{
const char *objName = NULL;
const char *objComment = NULL;
jboolean isCopy;
herr_t status = FAIL;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Oset_comment_by_name: object name is NULL");
PIN_JAVA_STRING(ENVONLY, name, objName, NULL, "H5Oset_comment_by_name: object name not pinned");
if (NULL != comment)
PIN_JAVA_STRING(ENVONLY, comment, objComment, &isCopy,
"H5Oset_comment_by_name: object comment not pinned");
if ((status = H5Oset_comment_by_name((hid_t)loc_id, objName, objComment, (hid_t)access_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (objComment)
UNPIN_JAVA_STRING(ENVONLY, comment, objComment);
if (objName)
UNPIN_JAVA_STRING(ENVONLY, name, objName);
} /* end Java_hdf_hdf5lib_H5_H5Oset_1comment_1by_1name */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Oget_comment
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
Java_hdf_hdf5lib_H5_H5Oget_1comment(JNIEnv *env, jclass clss, jlong loc_id)
{
jstring str = NULL;
ssize_t buf_size;
ssize_t status = -1;
char *oComment = NULL;
UNUSED(clss);
/* Get the length of the comment */
if ((buf_size = H5Oget_comment((hid_t)loc_id, NULL, 0)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (buf_size) {
if (NULL == (oComment = (char *)malloc(sizeof(char) * (size_t)buf_size + 1)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Oget_comment: failed to allocate object comment buffer");
if ((status = H5Oget_comment((hid_t)loc_id, oComment, (size_t)buf_size + 1)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
oComment[buf_size] = '\0';
if (NULL == (str = ENVPTR->NewStringUTF(ENVONLY, oComment)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
}
done:
if (oComment)
free(oComment);
return (jstring)str;
} /* end Java_hdf_hdf5lib_H5_H5Oget_1comment */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Oget_comment_by_name
* Signature: (JLjava/lang/String;J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL
Java_hdf_hdf5lib_H5_H5Oget_1comment_1by_1name(JNIEnv *env, jclass clss, jlong loc_id, jstring name,
jlong access_id)
{
const char *objName = NULL;
jstring str = NULL;
ssize_t buf_size;
ssize_t status;
char *objComment = NULL;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Oget_comment_by_name: object name is NULL");
PIN_JAVA_STRING(ENVONLY, name, objName, NULL, "H5Oget_comment_by_name: object name not pinned");
/* Get the length of the comment */
if ((buf_size = H5Oget_comment_by_name((hid_t)loc_id, objName, NULL, 0, (hid_t)access_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (buf_size) {
if (NULL == (objComment = (char *)malloc(sizeof(char) * (size_t)buf_size + 1)))
H5_OUT_OF_MEMORY_ERROR(ENVONLY,
"H5Oget_comment_by_name: failed to allocate buffer for object comment");
if ((status = H5Oget_comment_by_name((hid_t)loc_id, objName, objComment, (size_t)buf_size + 1,
(hid_t)access_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
objComment[buf_size] = '\0';
if (NULL == (str = ENVPTR->NewStringUTF(ENVONLY, objComment)))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
}
done:
if (objComment)
free(objComment);
if (objName)
UNPIN_JAVA_STRING(ENVONLY, name, objName);
return (jstring)str;
} /* end Java_hdf_hdf5lib_H5_H5Oget_1comment_1by_1name */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Oexists_by_name
* Signature: (JLjava/lang/String;J)Z
*/
JNIEXPORT jboolean JNICALL
Java_hdf_hdf5lib_H5_H5Oexists_1by_1name(JNIEnv *env, jclass clss, jlong loc_id, jstring name, jlong access_id)
{
const char *objName = NULL;
htri_t bval = JNI_FALSE;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Oexists_by_name: object name is NULL");
PIN_JAVA_STRING(ENVONLY, name, objName, NULL, "H5Oexists_by_name: object name not pinned");
if ((bval = H5Oexists_by_name((hid_t)loc_id, objName, (hid_t)access_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
bval = (bval > 0) ? JNI_TRUE : JNI_FALSE;
done:
if (objName)
UNPIN_JAVA_STRING(ENVONLY, name, objName);
return (jboolean)bval;
} /* end Java_hdf_hdf5lib_H5_H5Oexists_1by_1name */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Odecr_refcount
* Signature: (J)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Odecr_1refcount(JNIEnv *env, jclass clss, jlong object_id)
{
UNUSED(clss);
if (H5Odecr_refcount((hid_t)object_id) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return;
}
/* end Java_hdf_hdf5lib_H5_H5Odecr_1refcount */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Oincr_refcount
* Signature: (J)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Oincr_1refcount(JNIEnv *env, jclass clss, jlong object_id)
{
UNUSED(clss);
if (H5Oincr_refcount((hid_t)object_id) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return;
} /* end Java_hdf_hdf5lib_H5_H5Oincr_1refcount */
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Oopen_by_token
* Signature: (JLhdf/hdf5lib/structs/H5O_token_t;)J;
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Oopen_1by_1token(JNIEnv *env, jclass clss, jlong loc_id, jobject token)
{
H5O_token_t obj_token;
jboolean token_buf_is_copy;
jfieldID token_data_field_id;
jclass token_cls;
jbyte *token_buf = NULL;
jobject token_data;
hid_t retVal = H5I_INVALID_HID;
UNUSED(clss);
token_cls = ENVPTR->GetObjectClass(ENVONLY, token);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
if (NULL == (token_data_field_id = ENVPTR->GetFieldID(ENVONLY, token_cls, "data", "[B")))
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
token_data = ENVPTR->GetObjectField(ENVONLY, token, token_data_field_id);
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
PIN_BYTE_ARRAY(ENVONLY, (jbyteArray)token_data, token_buf, &token_buf_is_copy,
"H5Oopen_by_token: token buffer not pinned");
memcpy(&obj_token, token_buf, sizeof(H5O_token_t));
UNPIN_BYTE_ARRAY(ENVONLY, (jbyteArray)token_data, token_buf, JNI_ABORT);
token_buf = NULL;
if ((retVal = H5Oopen_by_token((hid_t)loc_id, obj_token)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (token_buf)
UNPIN_BYTE_ARRAY(ENVONLY, (jbyteArray)token_data, token_buf, (retVal < 0) ? JNI_ABORT : 0);
return (jlong)retVal;
} /* end Java_hdf_hdf5lib_H5__1H5Oopen_1by_1token */
/*
* Class: hdf_hdf5lib_H5
* Method: _H5Oopen_by_idx
* Signature: (JLjava/lang/String;IIJJ)J;
*/
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Oopen_1by_1idx(JNIEnv *env, jclass clss, jlong loc_id, jstring name, jint index_field,
jint order, jlong link_n, jlong lapl_id)
{
const char *grpName = NULL;
hid_t retVal = H5I_INVALID_HID;
UNUSED(clss);
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Oopen_by_idx: object name is NULL");
PIN_JAVA_STRING(ENVONLY, name, grpName, NULL, "H5Oopen_by_idx: object name not pinned");
if ((retVal = H5Oopen_by_idx((hid_t)loc_id, grpName, (H5_index_t)index_field, (H5_iter_order_t)order,
(hsize_t)link_n, (hid_t)lapl_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
if (grpName)
UNPIN_JAVA_STRING(ENVONLY, name, grpName);
return (jlong)retVal;
} /* end Java_hdf_hdf5lib_H5__1H5Oopen_1by_1idx */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Oflush
* Signature: (J)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Oflush(JNIEnv *env, jclass clss, jlong loc_id)
{
UNUSED(clss);
if (H5Oflush((hid_t)loc_id) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return;
} /* end Java_hdf_hdf5lib_H5_H5Oflush */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Orefresh
* Signature: (J)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Orefresh(JNIEnv *env, jclass clss, jlong loc_id)
{
UNUSED(clss);
if (H5Orefresh((hid_t)loc_id) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return;
} /* end Java_hdf_hdf5lib_H5_H5Orefresh */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Odisable_mdc_flushes
* Signature: (J)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Odisable_1mdc_1flushes(JNIEnv *env, jclass clss, jlong loc_id)
{
UNUSED(clss);
if (H5Odisable_mdc_flushes((hid_t)loc_id) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return;
} /* end Java_hdf_hdf5lib_H5_H5Odisable_1mdc_1flushes */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Oenable_mdc_flushes
* Signature: (J)V
*/
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Oenable_1mdc_1flushes(JNIEnv *env, jclass clss, jlong loc_id)
{
UNUSED(clss);
if (H5Oenable_mdc_flushes((hid_t)loc_id) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
return;
} /* end Java_hdf_hdf5lib_H5_H5Oenable_1mdc_1flushes */
/*
* Class: hdf_hdf5lib_H5
* Method: H5Oare_mdc_flushes_disabled
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL
Java_hdf_hdf5lib_H5_H5Oare_1mdc_1flushes_1disabled(JNIEnv *env, jclass clss, jlong loc_id)
{
jboolean bval = JNI_FALSE;
bool is_disabled = false;
UNUSED(clss);
if (H5Oare_mdc_flushes_disabled((hid_t)loc_id, &is_disabled) < 0)
H5_LIBRARY_ERROR(ENVONLY);
if (is_disabled == true)
bval = JNI_TRUE;
done:
return bval;
} /* end Java_hdf_hdf5lib_H5_H5Oare_1mdc_1flushes_1disabled */
#ifdef __cplusplus
} /* end extern "C" */
#endif /* __cplusplus */

Some files were not shown because too many files have changed in this diff Show More