mirror of
https://github.com/HDFGroup/hdf5.git
synced 2026-09-25 04:09:44 +03:00
* Fixed dead links in docs (#4334) * Revert "Fixed dead links in docs (#4334)" (#4335) This reverts commit408fc66002. * Fix grammar and content in HDF5Examples (#4333) * Remove HD macros for C time functions (#4337) * HDasctime * HDclock * HDctime * HDdifftime * HDgmtime * HDlocaltime * HDmktime * HDtime * HDtzset HDgettimeofday will be done later * Remove HD prefix from toupper/tolower (#4340) * Add VDS and SWMR to documentation (#4336) * Clean up random number generator code (#4338) * Clean up random number generator code Depending on the platform, we use a mix of random, rand, and rand_r to generate pseudo-random numbers, along with a messy set of ifdefs in H5private.h. We are not a cryptographic library, only use random numbers in our test code, and have no need for anything more than the C standard's (s)rand(). There's no point dithering about using rand() vs random() when we're also doing bad things like using mod to restrict the range, which introduces bias. Also removes CMake/configure checks for rand_r and random * Remove random/rand_r checks from build system * Fix missed HDrandom after GitHub merge * Remove the getting started guide (#4339) This was moved to the wiki * Remove noise comment from H5DO.c (#4342) * Add note about H5Iregister_type hash_table param (#4345) The hash_table parameter is unused in HDF5 1.8.13 and later, when we moved from using hash tables to skip lists for storing IDs. The current hash table implementation does not use this parameter. * Remove `#undef ERR` from H5private.h (#4346) This is an old work-around that is no longer necessary. The only place where we defined ERR is in h5import, and that code has been updated (in this PR) to rename ERR to INVALID_TOKEN. * Add NAMECHECK_ONLY to macro list in .clang-format (#4343) This caused H5TS.c functions to be mis-formatted * Remove HD from last non-win32 C89 functions (#4348) Removes the HD prefix from the last C89 functions with no special Windows equilvalent: * rename * rewind * setbuf * signal * tmpfile * Fix dead links cont. (#4349) Added img/images_to_copy.dox as a temporary solution because doxygen didn't copy the images used in the examples/*.html files - will investigate more. This was necessary for the links to intro_SWMR.html and intro_VDS.html. * Fix a typo (#4352) * Fix use of possibly uninitialized memory in h5repack (#4354) * Match content listing with content. (#4357) * Remove obsolete c++ doxygen config files (#4358) * Fix typo VERSIO (#4363) * Removed duplicate entries in compile line for h5* compiler wrappers (#4360) * h5fc remove duplicate args * h5 wrappers remove duplicate args * Added CVE info to RELEASE.txt (#4367) * Change doxygen version from 1.10.0 to 1.9.7 (#4371) * Fix all doxygen versions (#4377) * Change date to data in INSTALL_parallel (#4384) * Fix a broken link for zlib url (#4383) * Fix broken links and references in INSTALL_Auto.txt (#4382) * Remove signature in comment (#4366) * switched from \returns to commonly used \return (#4389) * Add CXX flags (#4359) * Remove TRACE macros (#4341) * Set available CMake build types for non-multi-config generators (#4330) * Correct the high-level library link (#4398) * Correct the high-level library link The link currently used points to 1.13 release. Changed to use the md file instead. * Update Doxyfile for md files * Update to include md files * Add additional terms to the glossary (#4401) Fixes GH #4390 * added missing doxygen \since (#4410) * Update Intel oneAPI version to 2024.1 (#4412) * Update documentation (#4403) - Added File Image Operations to Technical Notes * Use a correct example location * Use aliases for URLs (#4409) * Fix CXX sanitizer by moving marco include to after CXX code. (#4414) * Update and use more URL alias (#4413) * Update documentation (#4415) Added the replacement for https://docs.hdfgroup.org/archive/support/HDF5/doc/TechNotes/Version.html Corrected some minor typos and another deadlink * Remove obsolete file (#4416) * Update oneAPI version to 2024.1 for Daily Build (#4418) * Add training videos page (#4422) * Updates for release_docs/NEWSLETTER.txt. (#4423) * Add release process markdown file (#4312) * Lowercase in File Format Specification (#4424) * Fixing string in RELEASE_PROCESS.md that is causing a doxygen error - (#4430) Unsupported xml/html tag <n> found. * Allow clang-format to format H5Cpkg.h (#4429) Co-authored-by: Larry Knox <lrknox@hdfgroup.org> * Fix broken links in md files needing full URLs. * Add URL for Java examples that was accidentally dropped. Change paths from develop to 1.14 directories for some doxygen generated files. * Correct typo. * Fix 2 more dead URLs. * Revert "Clean up random number generator code (#4338)" This reverts commit58e4d0842a.
97 lines
3.6 KiB
HTML
97 lines
3.6 KiB
HTML
<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
|
|
(
|
|
JNIEnv *env,
|
|
jclass class,
|
|
jstring hdfFile,
|
|
jint flags,
|
|
jlong access)
|
|
{
|
|
|
|
/* ...convert Java String to (char *) */
|
|
|
|
/* call the HDF library */
|
|
retVal = H5Fopen((char *)file, (unsigned)flags, (hid_t)access);
|
|
|
|
/* ... */
|
|
}</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.*;
|
|
|
|
{
|
|
/* ... */
|
|
|
|
try {
|
|
file = H5.Hopen("myFile.hdf", flags, access );
|
|
} catch (HDF5Exception ex) {
|
|
//...
|
|
}
|
|
|
|
/* ... */
|
|
}</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://portal.hdfgroup.org/downloads/index.html">HDF5</a> library.
|
|
|
|
</body>
|