From 7416cd2598a06af5e1e65d46ee8f5a76b6ea6ede Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 28 Oct 2020 09:25:26 -0500 Subject: HDFFV-10868 merge from develop --- java/src/hdf/hdf5lib/H5.java | 3408 +++++++++++++++++--- java/src/hdf/hdf5lib/HDF5Constants.java | 484 ++- java/src/hdf/hdf5lib/callbacks/H5A_iterate_cb.java | 25 +- java/src/hdf/hdf5lib/callbacks/H5A_iterate_t.java | 4 + java/src/hdf/hdf5lib/callbacks/H5D_append_cb.java | 22 +- java/src/hdf/hdf5lib/callbacks/H5D_append_t.java | 4 + java/src/hdf/hdf5lib/callbacks/H5D_iterate_cb.java | 24 +- java/src/hdf/hdf5lib/callbacks/H5D_iterate_t.java | 4 + java/src/hdf/hdf5lib/callbacks/H5E_walk_cb.java | 22 +- java/src/hdf/hdf5lib/callbacks/H5E_walk_t.java | 4 + .../hdf5lib/callbacks/H5L_iterate_opdata_t.java | 4 + java/src/hdf/hdf5lib/callbacks/H5L_iterate_t.java | 25 +- .../hdf5lib/callbacks/H5O_iterate_opdata_t.java | 4 + java/src/hdf/hdf5lib/callbacks/H5O_iterate_t.java | 25 +- .../hdf5lib/callbacks/H5P_cls_close_func_cb.java | 21 +- .../hdf5lib/callbacks/H5P_cls_close_func_t.java | 4 + .../hdf5lib/callbacks/H5P_cls_copy_func_cb.java | 22 +- .../hdf/hdf5lib/callbacks/H5P_cls_copy_func_t.java | 4 + .../hdf5lib/callbacks/H5P_cls_create_func_cb.java | 21 +- .../hdf5lib/callbacks/H5P_cls_create_func_t.java | 4 + java/src/hdf/hdf5lib/callbacks/H5P_iterate_cb.java | 22 +- java/src/hdf/hdf5lib/callbacks/H5P_iterate_t.java | 4 + .../hdf5lib/callbacks/H5P_prp_close_func_cb.java | 22 +- .../hdf5lib/callbacks/H5P_prp_compare_func_cb.java | 22 +- .../hdf5lib/callbacks/H5P_prp_copy_func_cb.java | 22 +- .../hdf5lib/callbacks/H5P_prp_create_func_cb.java | 22 +- .../hdf5lib/callbacks/H5P_prp_delete_func_cb.java | 23 +- .../hdf/hdf5lib/callbacks/H5P_prp_get_func_cb.java | 23 +- .../hdf/hdf5lib/callbacks/H5P_prp_set_func_cb.java | 23 +- java/src/hdf/hdf5lib/exceptions/HDF5Exception.java | 3 + .../hdf5lib/exceptions/HDF5ReferenceException.java | 6 + .../hdf/hdf5lib/structs/H5AC_cache_config_t.java | 5 +- java/src/hdf/hdf5lib/structs/H5A_info_t.java | 5 +- java/src/hdf/hdf5lib/structs/H5E_error2_t.java | 5 +- java/src/hdf/hdf5lib/structs/H5FD_hdfs_fapl_t.java | 2 +- java/src/hdf/hdf5lib/structs/H5FD_ros3_fapl_t.java | 2 +- java/src/hdf/hdf5lib/structs/H5F_info2_t.java | 5 +- java/src/hdf/hdf5lib/structs/H5G_info_t.java | 5 +- java/src/hdf/hdf5lib/structs/H5L_info_t.java | 5 +- java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java | 25 +- java/src/hdf/hdf5lib/structs/H5O_info_t.java | 5 +- .../src/hdf/hdf5lib/structs/H5O_native_info_t.java | 7 +- java/src/hdf/hdf5lib/structs/H5O_token_t.java | 5 +- java/src/hdf/hdf5lib/structs/H5_ih_info_t.java | 9 +- java/src/jni/h5Constants.c | 378 ++- java/src/jni/h5sImp.c | 383 +++ java/src/jni/h5sImp.h | 59 + java/test/TestH5Sbasic.java | 138 + java/test/testfiles/JUnit-TestH5Sbasic.txt | 16 +- release_docs/RELEASE.txt | 8 + 50 files changed, 4931 insertions(+), 463 deletions(-) diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index b724382..3c5a124 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -241,10 +241,14 @@ public class H5 implements java.io.Serializable { */ public final static int LIB_VERSION[] = { 1, 12, 1 }; + /** + * add system property to load library by path + */ public final static String H5PATH_PROPERTY_KEY = "hdf.hdf5lib.H5.hdf5lib"; - // add system property to load library by name from library path, via - // System.loadLibrary() + /** + * add system property to load library by name from library path, via System.loadLibrary() + */ public final static String H5_LIBRARY_NAME_PROPERTY_KEY = "hdf.hdf5lib.H5.loadLibraryName"; private static String s_libraryName; private static boolean isLibraryLoaded = false; @@ -257,6 +261,9 @@ public class H5 implements java.io.Serializable { loadH5Lib(); } + /** + * load native library + */ public static void loadH5Lib() { // Make sure that the library is loaded only once if (isLibraryLoaded) @@ -468,6 +475,35 @@ public class H5 implements java.io.Serializable { **/ public synchronized static native int H5get_libversion(int[] libversion) throws HDF5LibraryException; + /** + * H5set_free_list_limits + * Sets limits on the different kinds of free lists. Setting a value + * of -1 for a limit means no limit of that type. These limits are global + * for the entire library. Each "global" limit only applies to free lists + * of that type, so if an application sets a limit of 1 MB on each of the + * global lists, up to 3 MB of total storage might be allocated (1MB on + * each of regular, array and block type lists). + * + * The settings for block free lists are duplicated to factory free lists. + * Factory free list limits cannot be set independently currently. + * + * @param reg_global_lim + * The limit on all "regular" free list memory used + * @param reg_list_lim + * The limit on memory used in each "regular" free list + * @param arr_global_lim + * The limit on all "array" free list memory used + * @param arr_list_lim + * The limit on memory used in each "array" free list + * @param blk_global_lim + * The limit on all "block" free list memory used + * @param blk_list_lim + * The limit on memory used in each "block" free list + * @return a non-negative value if successful, along with the version information. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + */ public synchronized static native int 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) throws HDF5LibraryException; @@ -1016,7 +1052,7 @@ public class H5 implements java.io.Serializable { /** * H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with - * mem_type_id. The entire attribute is read into buf from the file. + * mem_type_id. The entire attribute is read into buffer from the file. * * @param attr_id * IN: Identifier of an attribute to read. @@ -1037,11 +1073,47 @@ public class H5 implements java.io.Serializable { public synchronized static native int H5Aread(long attr_id, long mem_type_id, byte[] obj, boolean isCriticalPinning) throws HDF5LibraryException, NullPointerException; + /** + * H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is read into buffer from the file. + * + * @param attr_id + * IN: Identifier of an attribute to read. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param buf + * Buffer to store data read from the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ public synchronized static int H5Aread(long attr_id, long mem_type_id, byte[] buf) throws HDF5LibraryException, NullPointerException { return H5Aread(attr_id, mem_type_id, buf, true); } + /** + * H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is read into buffer from the file. + * + * @param attr_id + * IN: Identifier of an attribute to read. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param obj + * Buffer to store data read from the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ public synchronized static int H5Aread(long attr_id, long mem_type_id, Object obj) throws HDF5Exception, HDF5LibraryException, NullPointerException { return H5Aread(attr_id, mem_type_id, obj, true); @@ -1141,170 +1213,486 @@ public class H5 implements java.io.Serializable { return status; } + /** + * H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is read into buffer of double from the file. + * + * @param attr_id + * IN: Identifier of an attribute to read. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param buf + * Buffer of double to store data read from the file. + * @param isCriticalPinning + * request lock on data reference. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ public synchronized static native int H5Aread_double(long attr_id, long mem_type_id, double[] buf, boolean isCriticalPinning) throws HDF5LibraryException, NullPointerException; + /** + * H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is read into buffer of double from the file. + * + * @param attr_id + * IN: Identifier of an attribute to read. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param buf + * Buffer of double to store data read from the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ public synchronized static int H5Aread_double(long attr_id, long mem_type_id, double[] buf) throws HDF5LibraryException, NullPointerException { return H5Aread_double(attr_id, mem_type_id, buf, true); } + /** + * H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is read into buffer of float from the file. + * + * @param attr_id + * IN: Identifier of an attribute to read. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param buf + * Buffer of float to store data read from the file. + * @param isCriticalPinning + * request lock on data reference. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ public synchronized static native int H5Aread_float(long attr_id, long mem_type_id, float[] buf, boolean isCriticalPinning) throws HDF5LibraryException, NullPointerException; + /** + * H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is read into buffer of float from the file. + * + * @param attr_id + * IN: Identifier of an attribute to read. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param buf + * Buffer of float to store data read from the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ public synchronized static int H5Aread_float(long attr_id, long mem_type_id, float[] buf) throws HDF5LibraryException, NullPointerException { return H5Aread_float(attr_id, mem_type_id, buf, true); } - public synchronized static native int H5Aread_int(long attr_id, long mem_type_id, int[] buf, boolean isCriticalPinning) - throws HDF5LibraryException, NullPointerException; - - public synchronized static int H5Aread_int(long attr_id, long mem_type_id, int[] buf) - throws HDF5LibraryException, NullPointerException - { - return H5Aread_int(attr_id, mem_type_id, buf, true); - } - - public synchronized static native int H5Aread_long(long attr_id, long mem_type_id, long[] buf, boolean isCriticalPinning) - throws HDF5LibraryException, NullPointerException; - - public synchronized static int H5Aread_long(long attr_id, long mem_type_id, long[] buf) - throws HDF5LibraryException, NullPointerException - { - return H5Aread_long(attr_id, mem_type_id, buf, true); - } - - public synchronized static native int H5Aread_reg_ref(long attr_id, long mem_type_id, String[] buf) - throws HDF5LibraryException, NullPointerException; - - public synchronized static native int H5Aread_short(long attr_id, long mem_type_id, short[] buf, boolean isCriticalPinning) - throws HDF5LibraryException, NullPointerException; - - public synchronized static int H5Aread_short(long attr_id, long mem_type_id, short[] buf) - throws HDF5LibraryException, NullPointerException - { - return H5Aread_short(attr_id, mem_type_id, buf, true); - } - - public synchronized static native int H5AreadVL(long attr_id, long mem_type_id, Object[] buf) - throws HDF5LibraryException, NullPointerException; - - public synchronized static native int H5Aread_string(long attr_id, long mem_type_id, String[] buf) - throws HDF5LibraryException, NullPointerException; - - public synchronized static native int H5Aread_VLStrings(long attr_id, long mem_type_id, Object[] buf) - throws HDF5LibraryException, NullPointerException; - - public synchronized static native int H5AreadComplex(long attr_id, long mem_type_id, String[] buf) - throws HDF5LibraryException, NullPointerException; - /** - * H5Arename changes the name of attribute that is attached to the object specified by loc_id. The attribute named - * old_attr_name is renamed new_attr_name. + * H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is read into buffer of int from the file. * - * @param loc_id - * IN: Location or object identifier; may be dataset or group - * @param old_attr_name - * IN: Prior attribute name - * @param new_attr_name - * IN: New attribute name + * @param attr_id + * IN: Identifier of an attribute to read. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param buf + * Buffer of int to store data read from the file. + * @param isCriticalPinning + * request lock on data reference. * - * @return A non-negative value if successful; otherwise returns a negative value. + * @return a non-negative value if successful * * @exception HDF5LibraryException * - Error from the HDF-5 Library. * @exception NullPointerException - * - Name is null. + * - data buffer is null. **/ - public synchronized static native int H5Arename(long loc_id, String old_attr_name, String new_attr_name) + public synchronized static native int H5Aread_int(long attr_id, long mem_type_id, int[] buf, boolean isCriticalPinning) throws HDF5LibraryException, NullPointerException; /** - * H5Arename_by_name changes the name of attribute that is attached to the object specified by loc_id and obj_name. - * The attribute named old_attr_name is renamed new_attr_name. + * H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is read into buffer of int from the file. * - * @param loc_id - * IN: Location or object identifier; may be dataset or group - * @param obj_name - * IN: Name of object, relative to location, whose attribute is to be renamed - * @param old_attr_name - * IN: Prior attribute name - * @param new_attr_name - * IN: New attribute name - * @param lapl_id - * IN: Link access property list + * @param attr_id + * IN: Identifier of an attribute to read. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param buf + * Buffer of int to store data read from the file. * - * @return A non-negative value if successful; otherwise returns a negative value. + * @return a non-negative value if successful * * @exception HDF5LibraryException * - Error from the HDF-5 Library. * @exception NullPointerException - * - Name is null. + * - data buffer is null. **/ - public synchronized static native int H5Arename_by_name(long loc_id, String obj_name, String old_attr_name, - String new_attr_name, long lapl_id) throws HDF5LibraryException, NullPointerException; + public synchronized static int H5Aread_int(long attr_id, long mem_type_id, int[] buf) + throws HDF5LibraryException, NullPointerException + { + return H5Aread_int(attr_id, mem_type_id, buf, true); + } /** - * H5Awrite writes an attribute, specified with attr_id. The attribute's memory datatype is specified with - * mem_type_id. The entire attribute is written from buf to the file. + * H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is read into buffer of long from the file. * * @param attr_id - * IN: Identifier of an attribute to write. + * IN: Identifier of an attribute to read. * @param mem_type_id * IN: Identifier of the attribute datatype (in memory). * @param buf - * IN: Buffer with data to be written to the file. + * Buffer of long to store data read from the file. * @param isCriticalPinning - * IN: request lock on data reference. + * request lock on data reference. * * @return a non-negative value if successful * * @exception HDF5LibraryException * - Error from the HDF-5 Library. * @exception NullPointerException - * - data is null. + * - data buffer is null. **/ - public synchronized static native int H5Awrite(long attr_id, long mem_type_id, byte[] buf, boolean isCriticalPinning) + public synchronized static native int H5Aread_long(long attr_id, long mem_type_id, long[] buf, boolean isCriticalPinning) throws HDF5LibraryException, NullPointerException; - public synchronized static int H5Awrite(long attr_id, long mem_type_id, byte[] buf) + /** + * H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is read into buffer of long from the file. + * + * @param attr_id + * IN: Identifier of an attribute to read. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param buf + * Buffer of long to store data read from the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ + public synchronized static int H5Aread_long(long attr_id, long mem_type_id, long[] buf) throws HDF5LibraryException, NullPointerException { - return H5Awrite(attr_id, mem_type_id, buf, true); - } - - public synchronized static int H5Awrite(long attr_id, long mem_type_id, Object obj) - throws HDF5Exception, HDF5LibraryException, NullPointerException - { - return H5Awrite(attr_id, mem_type_id, obj, true); + return H5Aread_long(attr_id, mem_type_id, buf, true); } /** - * H5Awrite writes an attribute, specified with attr_id. The attribute's memory datatype is specified with - * mem_type_id. The entire attribute is written from data object to the file. + * H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is read into buffer of String from the file. * * @param attr_id - * IN: Identifier of an attribute to write. + * IN: Identifier of an attribute to read. * @param mem_type_id * IN: Identifier of the attribute datatype (in memory). - * @param obj - * IN: Data object to be written. - * @param isCriticalPinning - * request lock on data reference. + * @param buf + * Buffer of String to store data read from the file. * * @return a non-negative value if successful * - * @exception HDF5Exception - * - Failure in the data conversion. * @exception HDF5LibraryException * - Error from the HDF-5 Library. * @exception NullPointerException - * - data object is null + * - data buffer is null. **/ - public synchronized static int H5Awrite(long attr_id, long mem_type_id, Object obj, boolean isCriticalPinning) + public synchronized static native int H5Aread_reg_ref(long attr_id, long mem_type_id, String[] buf) + throws HDF5LibraryException, NullPointerException; + + /** + * H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is read into buffer of short from the file. + * + * @param attr_id + * IN: Identifier of an attribute to read. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param buf + * Buffer of short to store data read from the file. + * @param isCriticalPinning + * request lock on data reference. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ + public synchronized static native int H5Aread_short(long attr_id, long mem_type_id, short[] buf, boolean isCriticalPinning) + throws HDF5LibraryException, NullPointerException; + + /** + * H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is read into buffer of shortfrom the file. + * + * @param attr_id + * IN: Identifier of an attribute to read. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param buf + * Buffer of short to store data read from the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ + public synchronized static int H5Aread_short(long attr_id, long mem_type_id, short[] buf) + throws HDF5LibraryException, NullPointerException + { + return H5Aread_short(attr_id, mem_type_id, buf, true); + } + + /** + * H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is read into buffer of variable-lenght from the file. + * + * @param attr_id + * IN: Identifier of an attribute to read. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param buf + * Buffer of variable-lenght to store data read from the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ + public synchronized static native int H5AreadVL(long attr_id, long mem_type_id, Object[] buf) + throws HDF5LibraryException, NullPointerException; + + /** + * H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is read into buffer of String from the file. + * + * @param attr_id + * IN: Identifier of an attribute to read. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param buf + * Buffer of String to store data read from the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ + public synchronized static native int H5Aread_string(long attr_id, long mem_type_id, String[] buf) + throws HDF5LibraryException, NullPointerException; + + /** + * H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is read into buffer of variable-lenght strings from the file. + * + * @param attr_id + * IN: Identifier of an attribute to read. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param buf + * Buffer of variable-lenght strings to store data read from the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ + public synchronized static native int H5Aread_VLStrings(long attr_id, long mem_type_id, Object[] buf) + throws HDF5LibraryException, NullPointerException; + + /** + * H5Aread reads an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is read into buffer of string from the file. + * + * @param attr_id + * IN: Identifier of an attribute to read. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param buf + * Buffer of string to store data read from the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ + public synchronized static native int H5AreadComplex(long attr_id, long mem_type_id, String[] buf) + throws HDF5LibraryException, NullPointerException; + + /** + * H5Arename changes the name of attribute that is attached to the object specified by loc_id. The attribute named + * old_attr_name is renamed new_attr_name. + * + * @param loc_id + * IN: Location or object identifier; may be dataset or group + * @param old_attr_name + * IN: Prior attribute name + * @param new_attr_name + * IN: New attribute name + * + * @return A non-negative value if successful; otherwise returns a negative value. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - Name is null. + **/ + public synchronized static native int H5Arename(long loc_id, String old_attr_name, String new_attr_name) + throws HDF5LibraryException, NullPointerException; + + /** + * H5Arename_by_name changes the name of attribute that is attached to the object specified by loc_id and obj_name. + * The attribute named old_attr_name is renamed new_attr_name. + * + * @param loc_id + * IN: Location or object identifier; may be dataset or group + * @param obj_name + * IN: Name of object, relative to location, whose attribute is to be renamed + * @param old_attr_name + * IN: Prior attribute name + * @param new_attr_name + * IN: New attribute name + * @param lapl_id + * IN: Link access property list + * + * @return A non-negative value if successful; otherwise returns a negative value. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - Name is null. + **/ + public synchronized static native int H5Arename_by_name(long loc_id, String obj_name, String old_attr_name, + String new_attr_name, long lapl_id) throws HDF5LibraryException, NullPointerException; + + /** + * H5Awrite writes an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is written from buf to the file. + * + * @param attr_id + * IN: Identifier of an attribute to write. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param buf + * IN: Buffer with data to be written to the file. + * @param isCriticalPinning + * IN: request lock on data reference. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data is null. + **/ + public synchronized static native int H5Awrite(long attr_id, long mem_type_id, byte[] buf, boolean isCriticalPinning) + throws HDF5LibraryException, NullPointerException; + + /** + * H5Awrite writes an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is written from buf to the file. + * + * @param attr_id + * IN: Identifier of an attribute to write. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param buf + * IN: Buffer with data to be written to the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data is null. + **/ + public synchronized static int H5Awrite(long attr_id, long mem_type_id, byte[] buf) + throws HDF5LibraryException, NullPointerException + { + return H5Awrite(attr_id, mem_type_id, buf, true); + } + + /** + * H5Awrite writes an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is written from buf to the file. + * + * @param attr_id + * IN: Identifier of an attribute to write. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param obj + * IN: Buffer with data to be written to the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data is null. + **/ + public synchronized static int H5Awrite(long attr_id, long mem_type_id, Object obj) + throws HDF5Exception, HDF5LibraryException, NullPointerException + { + return H5Awrite(attr_id, mem_type_id, obj, true); + } + + /** + * H5Awrite writes an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is written from data object to the file. + * + * @param attr_id + * IN: Identifier of an attribute to write. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param obj + * IN: Data object to be written. + * @param isCriticalPinning + * request lock on data reference. + * + * @return a non-negative value if successful + * + * @exception HDF5Exception + * - Failure in the data conversion. + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data object is null + **/ + public synchronized static int H5Awrite(long attr_id, long mem_type_id, Object obj, boolean isCriticalPinning) throws HDF5Exception, HDF5LibraryException, NullPointerException { int status = -1; @@ -1353,60 +1741,286 @@ public class H5 implements java.io.Serializable { return status; } + /** + * H5Awrite writes an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is written from buffer of double to the file. + * + * @param attr_id + * IN: Identifier of an attribute to write. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param buf + * IN: Buffer of double with data to be written to the file. + * @param isCriticalPinning + * IN: request lock on data reference. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data is null. + **/ public synchronized static native int H5Awrite_double(long attr_id, long mem_type_id, double[] buf, boolean isCriticalPinning) throws HDF5LibraryException, NullPointerException; + /** + * H5Awrite writes an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is written from buffer of double to the file. + * + * @param attr_id + * IN: Identifier of an attribute to write. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param buf + * IN: Buffer of double with data to be written to the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data is null. + **/ public synchronized static int H5Awrite_double(long attr_id, long mem_type_id, double[] buf) throws HDF5LibraryException, NullPointerException { return H5Awrite_double(attr_id, mem_type_id, buf, true); } + /** + * H5Awrite writes an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is written from buffer of float to the file. + * + * @param attr_id + * IN: Identifier of an attribute to write. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param buf + * IN: Buffer of float with data to be written to the file. + * @param isCriticalPinning + * IN: request lock on data reference. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data is null. + **/ public synchronized static native int H5Awrite_float(long attr_id, long mem_type_id, float[] buf, boolean isCriticalPinning) throws HDF5LibraryException, NullPointerException; + /** + * H5Awrite writes an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is written from buffer of float to the file. + * + * @param attr_id + * IN: Identifier of an attribute to write. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param buf + * IN: Buffer of float with data to be written to the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data is null. + **/ public synchronized static int H5Awrite_float(long attr_id, long mem_type_id, float[] buf) throws HDF5LibraryException, NullPointerException { return H5Awrite_float(attr_id, mem_type_id, buf, true); } + /** + * H5Awrite writes an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is written from buffer of int to the file. + * + * @param attr_id + * IN: Identifier of an attribute to write. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param buf + * IN: Buffer of int with data to be written to the file. + * @param isCriticalPinning + * IN: request lock on data reference. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data is null. + **/ public synchronized static native int H5Awrite_int(long attr_id, long mem_type_id, int[] buf, boolean isCriticalPinning) throws HDF5LibraryException, NullPointerException; + /** + * H5Awrite writes an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is written from buffer of int to the file. + * + * @param attr_id + * IN: Identifier of an attribute to write. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param buf + * IN: Buffer of int with data to be written to the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data is null. + **/ public synchronized static int H5Awrite_int(long attr_id, long mem_type_id, int[] buf) throws HDF5LibraryException, NullPointerException { return H5Awrite_int(attr_id, mem_type_id, buf, true); } + /** + * H5Awrite writes an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is written from buffer of long to the file. + * + * @param attr_id + * IN: Identifier of an attribute to write. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param buf + * IN: Buffer of long with data to be written to the file. + * @param isCriticalPinning + * IN: request lock on data reference. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data is null. + **/ public synchronized static native int H5Awrite_long(long attr_id, long mem_type_id, long[] buf, boolean isCriticalPinning) throws HDF5LibraryException, NullPointerException; + /** + * H5Awrite writes an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is written from buffer of long to the file. + * + * @param attr_id + * IN: Identifier of an attribute to write. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param buf + * IN: Buffer of long with data to be written to the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data is null. + **/ public synchronized static int H5Awrite_long(long attr_id, long mem_type_id, long[] buf) throws HDF5LibraryException, NullPointerException { return H5Awrite_long(attr_id, mem_type_id, buf, true); } + /** + * H5Awrite writes an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is written from buffer of short to the file. + * + * @param attr_id + * IN: Identifier of an attribute to write. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param buf + * IN: Buffer of short with data to be written to the file. + * @param isCriticalPinning + * IN: request lock on data reference. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data is null. + **/ public synchronized static native int H5Awrite_short(long attr_id, long mem_type_id, short[] buf, boolean isCriticalPinning) throws HDF5LibraryException, NullPointerException; + /** + * H5Awrite writes an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is written from buffer of short to the file. + * + * @param attr_id + * IN: Identifier of an attribute to write. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param buf + * IN: Buffer of short with data to be written to the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data is null. + **/ public synchronized static int H5Awrite_short(long attr_id, long mem_type_id, short[] buf) throws HDF5LibraryException, NullPointerException { return H5Awrite_short(attr_id, mem_type_id, buf, true); } + /** + * H5Awrite writes an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is written from buffer of string to the file. + * + * @param attr_id + * IN: Identifier of an attribute to write. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param buf + * IN: Buffer of string with data to be written to the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data is null. + **/ public synchronized static native int H5Awrite_string(long attr_id, long mem_type_id, String[] buf) throws HDF5LibraryException, NullPointerException; + /** + * H5Awrite writes an attribute, specified with attr_id. The attribute's memory datatype is specified with + * mem_type_id. The entire attribute is written from buffer of variable-lenght to the file. + * + * @param attr_id + * IN: Identifier of an attribute to write. + * @param mem_type_id + * IN: Identifier of the attribute datatype (in memory). + * @param buf + * IN: Buffer of variable-lenght with data to be written to the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data is null. + **/ public synchronized static native int H5AwriteVL(long attr_id, long mem_type_id, Object[] buf) throws HDF5LibraryException, NullPointerException; /** * H5Awrite_VLStrings writes a variable length String dataset, specified by its identifier attr_id, from - * the application memory buffer buf into the file. + * the application memory buffer buffer of variable-lenght strings into the file. * * ---- contributed by Rosetta Biosoftware * @@ -1415,7 +2029,7 @@ public class H5 implements java.io.Serializable { * @param mem_type_id * Identifier of the memory datatype. * @param buf - * Buffer with data to be written to the file. + * Buffer of variable-lenght strings with data to be written to the file. * * @return a non-negative value if successful * @@ -1922,12 +2536,60 @@ public class H5 implements java.io.Serializable { long file_space_id, long xfer_plist_id, byte[] obj, boolean isCriticalPinning) throws HDF5LibraryException, NullPointerException; + /** + * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application + * memory buffer buf. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param buf + * Buffer to store data read from the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ public synchronized static int H5Dread(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, byte[] buf) throws HDF5LibraryException, NullPointerException { return H5Dread(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf, true); } + /** + * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application + * memory buffer buf. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param obj + * Buffer to store data read from the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ public synchronized static int H5Dread(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, Object obj) throws HDF5Exception, HDF5LibraryException, NullPointerException { @@ -2043,65 +2705,411 @@ public class H5 implements java.io.Serializable { return status; } + /** + * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application + * memory buffer of type double. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param buf + * Buffer of type double to store data read from the file. + * @param isCriticalPinning + * request lock on data reference. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ public synchronized static native int H5Dread_double(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, double[] buf, boolean isCriticalPinning) throws HDF5LibraryException, NullPointerException; + /** + * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application + * memory buffer of type double. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param buf + * Buffer of double to store data read from the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ public synchronized static int H5Dread_double(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, double[] buf) throws HDF5LibraryException, NullPointerException { return H5Dread_double(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf, true); } + /** + * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application + * memory buffer of float. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param buf + * Buffer of float to store data read from the file. + * @param isCriticalPinning + * request lock on data reference. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ public synchronized static native int H5Dread_float(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, float[] buf, boolean isCriticalPinning) throws HDF5LibraryException, NullPointerException; + /** + * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application + * memory buffer of float. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param buf + * Buffer of float to store data read from the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ public synchronized static int H5Dread_float(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, float[] buf) throws HDF5LibraryException, NullPointerException { return H5Dread_float(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf, true); } + /** + * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application + * memory buffer of int. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param buf + * Buffer of int to store data read from the file. + * @param isCriticalPinning + * request lock on data reference. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ public synchronized static native int H5Dread_int(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, int[] buf, boolean isCriticalPinning) throws HDF5LibraryException, NullPointerException; + /** + * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application + * memory buffer of int. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param buf + * Buffer of int to store data read from the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ public synchronized static int H5Dread_int(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, int[] buf) throws HDF5LibraryException, NullPointerException { return H5Dread_int(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf, true); } + /** + * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application + * memory buffer of long. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param buf + * Buffer of long to store data read from the file. + * @param isCriticalPinning + * request lock on data reference. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ public synchronized static native int H5Dread_long(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, long[] buf, boolean isCriticalPinning) throws HDF5LibraryException, NullPointerException; + /** + * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application + * memory buffer of long. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param buf + * Buffer of long to store data read from the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ public synchronized static int H5Dread_long(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, long[] buf) throws HDF5LibraryException, NullPointerException { return H5Dread_long(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf, true); } + /** + * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application + * memory buffer of string. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param buf + * Buffer of string to store data read from the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ public synchronized static native int H5Dread_reg_ref(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, String[] buf) throws HDF5LibraryException, NullPointerException; + /** + * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application + * memory buffer of short. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param buf + * Buffer of short to store data read from the file. + * @param isCriticalPinning + * request lock on data reference. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ public synchronized static native int H5Dread_short(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, short[] buf, boolean isCriticalPinning) throws HDF5LibraryException, NullPointerException; + /** + * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application + * memory buffer of short. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param buf + * Buffer of short to store data read from the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ public synchronized static int H5Dread_short(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, short[] buf) throws HDF5LibraryException, NullPointerException { return H5Dread_short(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf, true); } + /** + * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application + * memory buffer of variable-lenght. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param buf + * Buffer of variable-lenght to store data read from the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ public synchronized static native int H5DreadVL(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, Object[] buf) throws HDF5LibraryException, NullPointerException; + /** + * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application + * memory buffer of string. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param buf + * Buffer of string to store data read from the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ public synchronized static native int H5Dread_string(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, String[] buf) throws HDF5LibraryException, NullPointerException; + /** + * H5Dread reads a (partial) dataset, specified by its identifier dataset_id, from the file into the application + * memory buffer of variable-lenght strings. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param buf + * Buffer of variable-lenght strings to store data read from the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - data buffer is null. + **/ public synchronized static native int H5Dread_VLStrings(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, Object[] buf) throws HDF5LibraryException, NullPointerException; @@ -2170,7 +3178,7 @@ public class H5 implements java.io.Serializable { /** * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer - * buf into the file. + * into the file. * * @param dataset_id * Identifier of the dataset read from. @@ -2198,12 +3206,60 @@ public class H5 implements java.io.Serializable { long file_space_id, long xfer_plist_id, byte[] buf, boolean isCriticalPinning) throws HDF5LibraryException, NullPointerException; + /** + * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer + * into the file. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param buf + * Buffer with data to be written to the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - name is null. + **/ public synchronized static int H5Dwrite(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, byte[] buf) throws HDF5LibraryException, NullPointerException { return H5Dwrite(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf, true); } + /** + * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer + * into the file. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param obj + * Buffer with data to be written to the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - name is null. + **/ public synchronized static int H5Dwrite(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, Object obj) throws HDF5Exception, HDF5LibraryException, NullPointerException { @@ -2299,59 +3355,357 @@ public class H5 implements java.io.Serializable { return status; } + /** + * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer + * into the file. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param buf + * Buffer of double with data to be written to the file. + * @param isCriticalPinning + * request lock on data reference. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - name is null. + **/ public synchronized static native int H5Dwrite_double(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, double[] buf, boolean isCriticalPinning) throws HDF5LibraryException, NullPointerException; + /** + * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer + * into the file. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param buf + * Buffer of double with data to be written to the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - name is null. + **/ public synchronized static int H5Dwrite_double(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, double[] buf) throws HDF5LibraryException, NullPointerException { return H5Dwrite_double(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf, true); } + /** + * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer + * into the file. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param buf + * Buffer of float with data to be written to the file. + * @param isCriticalPinning + * request lock on data reference. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - name is null. + **/ public synchronized static native int H5Dwrite_float(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, float[] buf, boolean isCriticalPinning) throws HDF5LibraryException, NullPointerException; + /** + * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer + * into the file. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param buf + * Buffer of float with data to be written to the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - name is null. + **/ public synchronized static int H5Dwrite_float(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, float[] buf) throws HDF5LibraryException, NullPointerException { return H5Dwrite_float(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf, true); } + /** + * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer + * into the file. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param buf + * Buffer of int with data to be written to the file. + * @param isCriticalPinning + * request lock on data reference. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - name is null. + **/ public synchronized static native int H5Dwrite_int(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, int[] buf, boolean isCriticalPinning) throws HDF5LibraryException, NullPointerException; + /** + * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer + * into the file. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param buf + * Buffer of int with data to be written to the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - name is null. + **/ public synchronized static int H5Dwrite_int(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, int[] buf) throws HDF5LibraryException, NullPointerException { return H5Dwrite_int(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf, true); } + /** + * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer + * into the file. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param buf + * Buffer of long with data to be written to the file. + * @param isCriticalPinning + * request lock on data reference. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - name is null. + **/ public synchronized static native int H5Dwrite_long(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, long[] buf, boolean isCriticalPinning) throws HDF5LibraryException, NullPointerException; + /** + * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer + * into the file. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param buf + * Buffer of long with data to be written to the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - name is null. + **/ public synchronized static int H5Dwrite_long(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, long[] buf) throws HDF5LibraryException, NullPointerException { return H5Dwrite_long(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf, true); } + /** + * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer + * into the file. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param buf + * Buffer of short with data to be written to the file. + * @param isCriticalPinning + * request lock on data reference. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - name is null. + **/ public synchronized static native int H5Dwrite_short(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, short[] buf, boolean isCriticalPinning) throws HDF5LibraryException, NullPointerException; + /** + * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer + * into the file. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param buf + * Buffer of short with data to be written to the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - name is null. + **/ public synchronized static int H5Dwrite_short(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, short[] buf) throws HDF5LibraryException, NullPointerException { return H5Dwrite_short(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf, true); } + /** + * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer + * into the file. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param buf + * Buffer of string with data to be written to the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - name is null. + **/ public synchronized static native int H5Dwrite_string(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, String[] buf) throws HDF5LibraryException, NullPointerException; + /** + * H5Dwrite writes a (partial) dataset, specified by its identifier dataset_id, from the application memory buffer + * into the file. + * + * @param dataset_id + * Identifier of the dataset read from. + * @param mem_type_id + * Identifier of the memory datatype. + * @param mem_space_id + * Identifier of the memory dataspace. + * @param file_space_id + * Identifier of the dataset's dataspace in the file. + * @param xfer_plist_id + * Identifier of a transfer property list for this I/O operation. + * @param buf + * Buffer of variable-length with data to be written to the file. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - name is null. + **/ public synchronized static native int H5DwriteVL(long dataset_id, long mem_type_id, long mem_space_id, long file_space_id, long xfer_plist_id, Object[] buf) throws HDF5LibraryException, NullPointerException; @@ -2628,7 +3982,7 @@ public class H5 implements java.io.Serializable { /** - * H5Epush2 pushes a new error record onto the error stack specified by estack_id. + * H5Epush pushes a new error record onto the error stack specified by estack_id. * * @param stack_id * IN: Error stack identifier. @@ -2657,6 +4011,31 @@ public class H5 implements java.io.Serializable { { H5Epush2(stack_id, file, func, line, cls_id, maj_id, min_id, msg); } + /** + * H5Epush2 pushes a new error record onto the error stack specified by estack_id. + * + * @param stack_id + * IN: Error stack identifier. + * @param file + * IN: Name of the file in which the error was detected. + * @param func + * IN: Name of the function in which the error was detected. + * @param line + * IN: Line number within the file at which the error was detected. + * @param cls_id + * IN: Error class identifier. + * @param maj_id + * IN: Major error identifier. + * @param min_id + * IN: Minor error identifier. + * @param msg + * IN: Error description string. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - file, func, or msg is null. + **/ public synchronized static native void H5Epush2(long stack_id, String file, String func, int line, long cls_id, long maj_id, long min_id, String msg) throws HDF5LibraryException, NullPointerException; @@ -2714,6 +4093,24 @@ public class H5 implements java.io.Serializable { { H5Ewalk2(stack_id, direction, func, client_data); } + /** + * H5Ewalk2 walks the error stack specified by estack_id for the current thread and calls the + * function specified in func for each error along the way. + * + * @param stack_id + * IN: Error stack identifier. + * @param direction + * IN: Direction in which the error stack is to be walked. + * @param func + * IN: Function to be called for each error encountered. + * @param client_data + * IN: Data to be passed with func. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - func is null. + **/ public synchronized static native void H5Ewalk2(long stack_id, long direction, H5E_walk_cb func, H5E_walk_t client_data) throws HDF5LibraryException, NullPointerException; @@ -2950,6 +4347,19 @@ public class H5 implements java.io.Serializable { private synchronized static native long _H5Fget_create_plist(long file_id) throws HDF5LibraryException; + /** + * H5Fget_filesize retrieves the file size of the HDF5 file. This function + * is called after an existing file is opened in order + * to learn the true size of the underlying file. + * + * @param file_id + * IN: File identifier for a currently-open HDF5 file + * + * @return the file size of the HDF5 file + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ public synchronized static native long H5Fget_filesize(long file_id) throws HDF5LibraryException; /** @@ -3598,37 +5008,118 @@ public class H5 implements java.io.Serializable { return H5Gget_obj_info_all(loc_id, name, objNames, objTypes, null, null, tokens, HDF5Constants.H5_INDEX_NAME); } - public synchronized static int H5Gget_obj_info_all(long loc_id, String name, String[] oname, int[] otype, + /** + * retrieves information of all objects under the group (name) located in the file or group specified by loc_id. + * + * @param loc_id + * IN: File or group identifier + * @param name + * IN: Name of group for which information is to be retrieved + * @param objNames + * OUT: Names of all objects under the group, name. + * @param objTypes + * OUT: Types of all objects under the group, name. + * @param ltype + * OUT: Link type + * @param tokens + * OUT: Object token of all objects under the group, name. + * @param indx_type + * IN: Index type for iterate + * + * @return the number of items found + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - name is null. + */ + public synchronized static int H5Gget_obj_info_all(long loc_id, String name, String[] objNames, int[] objTypes, int[] ltype, H5O_token_t[] tokens, int indx_type) throws HDF5LibraryException, NullPointerException { - return H5Gget_obj_info_full(loc_id, name, oname, otype, ltype, null, tokens, indx_type, -1); + return H5Gget_obj_info_full(loc_id, name, objNames, objTypes, ltype, null, tokens, indx_type, -1); } - public synchronized static int H5Gget_obj_info_all(long loc_id, String name, String[] oname, int[] otype, + /** + * retrieves information of all objects under the group (name) located in the file or group specified by loc_id. + * + * @param loc_id + * IN: File or group identifier + * @param name + * IN: Name of group for which information is to be retrieved + * @param objNames + * OUT: Names of all objects under the group, name. + * @param objTypes + * OUT: Types of all objects under the group, name. + * @param ltype + * OUT: Link type + * @param fno + * OUT: File number + * @param tokens + * OUT: Object token of all objects under the group, name. + * @param indx_type + * IN: Index type for iterate + * + * @return the number of items found + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - name is null. + */ + public synchronized static int H5Gget_obj_info_all(long loc_id, String name, String[] objNames, int[] objTypes, int[] ltype, long[] fno, H5O_token_t[] tokens, int indx_type) throws HDF5LibraryException, NullPointerException { - return H5Gget_obj_info_full(loc_id, name, oname, otype, ltype, fno, tokens, indx_type, -1); + return H5Gget_obj_info_full(loc_id, name, objNames, objTypes, ltype, fno, tokens, indx_type, -1); } - public synchronized static int H5Gget_obj_info_full(long loc_id, String name, String[] oname, int[] otype, + /** + * retrieves information of all objects under the group (name) located in the file or group specified by loc_id. + * + * @param loc_id + * IN: File or group identifier + * @param name + * IN: Name of group for which information is to be retrieved + * @param objNames + * OUT: Names of all objects under the group, name. + * @param objTypes + * OUT: Types of all objects under the group, name. + * @param ltype + * OUT: Link type + * @param fno + * OUT: File number + * @param tokens + * OUT: Object token of all objects under the group, name. + * @param indx_type + * IN: Index type for iterate + * @param indx_order + * IN: Index order for iterate + * + * @return the number of items found + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - name is null. + */ + public synchronized static int H5Gget_obj_info_full(long loc_id, String name, String[] objNames, int[] objTypes, int[] ltype, long[] fno, H5O_token_t[] tokens, int indx_type, int indx_order) throws HDF5LibraryException, NullPointerException { - if (oname == null) { + if (objNames == null) { throw new NullPointerException("H5Gget_obj_info_full(): name array is null"); } - if (otype == null) { + if (objTypes == null) { throw new NullPointerException("H5Gget_obj_info_full(): object type array is null"); } - if (oname.length == 0) { + if (objNames.length == 0) { throw new HDF5LibraryException("H5Gget_obj_info_full(): array size is zero"); } - if (oname.length != otype.length) { + if (objNames.length != objTypes.length) { throw new HDF5LibraryException("H5Gget_obj_info_full(): name and type array sizes are different"); } if (ltype == null) - ltype = new int[otype.length]; + ltype = new int[objTypes.length]; if (fno == null) fno = new long[tokens.length]; @@ -3639,15 +5130,15 @@ public class H5 implements java.io.Serializable { if (indx_order < 0) indx_order = HDF5Constants.H5_ITER_INC; - log.trace("H5Gget_obj_info_full: oname_len={}", oname.length); - int status = H5Gget_obj_info_full(loc_id, name, oname, otype, ltype, fno, tokens, oname.length, indx_type, + log.trace("H5Gget_obj_info_full: objNames_len={}", objNames.length); + int status = H5Gget_obj_info_full(loc_id, name, objNames, objTypes, ltype, fno, tokens, objNames.length, indx_type, indx_order); - for (int indx = 0; indx < oname.length; indx++) - log.trace("H5Gget_obj_info_full: oname={}", oname[indx]); + for (int indx = 0; indx < objNames.length; indx++) + log.trace("H5Gget_obj_info_full: objNames={}", objNames[indx]); return status; } - private synchronized static native int H5Gget_obj_info_full(long loc_id, String name, String[] oname, int[] otype, + private synchronized static native int H5Gget_obj_info_full(long loc_id, String name, String[] objNames, int[] objTypes, int[] ltype, long[] fno, H5O_token_t[] tokens, int n, int indx_type, int indx_order) throws HDF5LibraryException, NullPointerException; @@ -3663,9 +5154,9 @@ public class H5 implements java.io.Serializable { * @param idx * IN: the index of the object to iterate. * @param oname - * the name of the object [OUT] + * OUT: the name of the object * @param type - * the type of the object [OUT] + * OUT: the type of the object * * @return non-negative if successful, -1 if not. * @@ -3866,13 +5357,40 @@ public class H5 implements java.io.Serializable { // // // //////////////////////////////////////////////////////////// + /** + * H5Iget_file_id obtains the file ID specified by the identifier, obj_id. + * + * @param obj_id + * IN: Identifier of the object. + * + * @return the file ID. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ public synchronized static native long H5Iget_file_id(long obj_id) throws HDF5LibraryException; + /** + * H5Iget_name_long retrieves the name of an object specified by the identifier, obj_id. + * @deprecated + * + * @param obj_id + * IN: Identifier of the object. + * @param name + * OUT: Attribute name buffer. + * @param size + * IN: Maximum length of the name to retrieve. + * + * @return the length of the name retrieved. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ @Deprecated public synchronized static native long H5Iget_name_long(long obj_id, String[] name, long size) throws HDF5LibraryException, NullPointerException; /** - * H5Iget_name_str retrieves the name of an object specified by the identifier, obj_id. + * H5Iget_name retrieves the name of an object specified by the identifier, obj_id. * * @param obj_id * IN: Identifier of the object. @@ -3885,10 +5403,44 @@ public class H5 implements java.io.Serializable { public synchronized static native String H5Iget_name(long obj_id) throws HDF5LibraryException; + /** + * H5Iget_ref obtains the number of references outstanding specified by the identifier, obj_id. + * + * @param obj_id + * IN: Identifier of the object. + * + * @return the reference count. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ public synchronized static native int H5Iget_ref(long obj_id) throws HDF5LibraryException, NullPointerException; + /** + * H5Idec_ref decrements the reference count specified by the identifier, obj_id. + * If the reference count for an ID reaches zero, the object will be closed. + * + * @param obj_id + * IN: Identifier of the object. + * + * @return the reference count. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ public synchronized static native int H5Idec_ref(long obj_id) throws HDF5LibraryException, NullPointerException; + /** + * H5Iinc_ref increments the reference count specified by the identifier, obj_id. + * + * @param obj_id + * IN: Identifier of the object. + * + * @return the reference count. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ public synchronized static native int H5Iinc_ref(long obj_id) throws HDF5LibraryException, NullPointerException; /** @@ -5179,7 +6731,7 @@ public class H5 implements java.io.Serializable { return id; } - public synchronized static native long _H5Oopen_by_idx(long loc_id, String group_name, + private synchronized static native long _H5Oopen_by_idx(long loc_id, String group_name, int idx_type, int order, long n, long lapl_id) throws HDF5LibraryException, NullPointerException; /** @@ -5210,8 +6762,30 @@ public class H5 implements java.io.Serializable { **/ public synchronized static native void H5Orefresh(long object_id) throws HDF5LibraryException; + /** + * H5Odisable_mdc_flushes corks an object, keeping dirty entries associated with the object in the metadata cache. + * + * @param object_id + * IN: Identifier of the object to be corked. + **/ public synchronized static native void H5Odisable_mdc_flushes(long object_id); + /** + * H5Oenable_mdc_flushes uncorks an object, keeping dirty entries associated with the object in the metadata cache. + * + * @param object_id + * IN: Identifier of the object to be uncorked. + **/ public synchronized static native void H5Oenable_mdc_flushes(long object_id); + /** + * H5Oare_mdc_flushes_disabled retrieve the object's "cork" status. + * + * @param object_id + * IN: Identifier of the object to be flushed. + * + * @return the cork status + * TRUE if mdc flushes for the object is disabled + * FALSE if mdc flushes for the object is not disabled + **/ public synchronized static native boolean H5Oare_mdc_flushes_disabled(long object_id); // /////// unimplemented //////// @@ -5364,6 +6938,7 @@ public class H5 implements java.io.Serializable { * IN: First property object to be compared * @param plid2 * IN: Second property object to be compared + * * @return positive value if equal; zero if unequal, a negative value if failed * * @exception HDF5LibraryException @@ -5371,6 +6946,19 @@ public class H5 implements java.io.Serializable { */ public synchronized static native int H5Pequal(long plid1, long plid2) throws HDF5LibraryException; + /** + * H5Pequal determines if two property lists or classes are equal + * + * @param plid1 + * IN: First property object to be compared + * @param plid2 + * IN: Second property object to be compared + * + * @return TRUE if equal, FALSE if unequal + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + */ public static boolean H5P_equal(long plid1, long plid2) throws HDF5LibraryException { if (H5Pequal(plid1, plid2) == 1) return true; @@ -5456,7 +7044,7 @@ public class H5 implements java.io.Serializable { return _H5Pclose_class(plid); } - public synchronized static native int _H5Pclose_class(long plid) throws HDF5LibraryException; + private synchronized static native int _H5Pclose_class(long plid) throws HDF5LibraryException; /** * H5Pclose terminates access to a property list. @@ -5524,6 +7112,19 @@ public class H5 implements java.io.Serializable { // Define property list iteration function type // typedef herr_t (*H5P_iterate_t)(hid_t id, const char *name, void *iter_data); + /** + * H5Pcreate_class_nocb creates an new property class with no callback functions. + * + * @param parent_class + * IN: Identifier of the parent property class. + * @param name + * IN: Name of the property class. + * + * @return a property list identifier if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ public static long H5Pcreate_class_nocb(long parent_class, String name) throws HDF5LibraryException { long id = _H5Pcreate_class_nocb(parent_class, name); if (id > 0) { @@ -5550,17 +7151,69 @@ public class H5 implements java.io.Serializable { // private synchronized static native long _H5Pcreate_class(long parent_class, String name, H5P_cls_create_func_cb create_op, H5P_cls_create_func_t create_data, // H5P_cls_copy_func_cb copy_op, H5P_cls_copy_func_t copy_data, H5P_cls_close_func_cb close_op, H5P_cls_close_func_t close_data) throws HDF5LibraryException; + /** + * H5Pregister2_nocb registers a property list with no callback functions. + * + * @param plist_class + * IN: Identifier of the property list. + * @param name + * IN: Name of the property. + * @param size + * IN: Size the property value. + * @param def_value + * IN: Defaul value of the property + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ public synchronized static native void H5Pregister2_nocb(long plist_class, String name, long size, byte[] def_value) throws HDF5LibraryException; // public synchronized static native void H5Pregister2(long plist_class, String name, long size, byte[] def_value, H5P_prp_create_func_cb prp_create, H5P_prp_set_func_cb prp_set, // H5P_prp_get_func_cb prp_get, H5P_prp_delete_func_cb prp_delete, H5P_prp_copy_func_cb prp_copy, H5P_prp_compare_func_cb prp_cmp, H5P_prp_close_func_cb prp_close) throws HDF5LibraryException; + /** + * H5Pinsert2_nocb inserts a property list with no callback functions. + * + * @param plist + * IN: Identifier of the property list. + * @param name + * IN: Name of the property. + * @param size + * IN: Size the property value. + * @param value + * IN: Defaul value of the property + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ public synchronized static native void H5Pinsert2_nocb(long plist, String name, long size, byte[] value) throws HDF5LibraryException; // public synchronized static native void H5Pinsert2(long plist, String name, long size, byte[] value, H5P_prp_set_func_cb prp_set, H5P_prp_get_func_cb prp_get, // H5P_prp_delete_func_cb prp_delete, H5P_prp_copy_func_cb prp_copy, H5P_prp_compare_func_cb prp_cmp, H5P_prp_close_func_cb prp_close) throws HDF5LibraryException; + /** + * H5Piterate iterates over the properties in a property list or class + * + * @param plist + * IN: ID of property object to iterate over + * @param idx + * IN/OUT: index of the property to begin with + * @param op + * IN: function to be called with each property iterated over. + * @param op_data + * IN: iteration data from user + * + * @return + * the return value of the last call to op if it was non-zero, + * zero if all properties have been processed + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - size is null. + * + **/ public synchronized static native int H5Piterate(long plist, int[] idx, H5P_iterate_cb op, H5P_iterate_t op_data) throws HDF5LibraryException; // /////// Object creation property list (OCPL) routines /////// @@ -5573,7 +7226,7 @@ public class H5 implements java.io.Serializable { * @param attributes * The maximun and minimum no. of attributes to be stored. * - *
+     * 
      *      attributes[0] =  The maximum number of attributes to be stored in compact storage
      *      attributes[1] =  The minimum number of attributes to be stored in dense storage
      * 
@@ -5673,6 +7326,51 @@ public class H5 implements java.io.Serializable { public synchronized static native void H5Pset_obj_track_times(long ocpl_id, boolean track_times) throws HDF5LibraryException; + /** + * H5Pmodify_filter modifies the specified FILTER in the transient or permanent output filter pipeline + * depending on whether PLIST is a dataset creation or dataset + * transfer property list. The FLAGS argument specifies certain + * general properties of the filter and is documented below. + * The CD_VALUES is an array of CD_NELMTS integers which are + * auxiliary data for the filter. The integer vlues will be + * stored in the dataset object header as part of the filter + * information. + *

+ * The FLAGS argument is a bit vector of the following fields: + *

+ * H5Z_FLAG_OPTIONAL(0x0001) + * If this bit is set then the filter is optional. If the + * filter fails during an H5Dwrite() operation then the filter + * is just excluded from the pipeline for the chunk for which it + * failed; the filter will not participate in the pipeline + * during an H5Dread() of the chunk. If this bit is clear and + * the filter fails then the entire I/O operation fails. + * If this bit is set but encoding is disabled for a filter, + * attempting to write will generate an error. + *

+ * Note: This function currently supports only the permanent filter + * pipeline. That is, PLIST_ID must be a dataset creation + * property list. + * + * @param plist + * IN: Property list identifier. + * @param filter + * IN: Filter to be modified to the pipeline. + * @param flags + * IN: Bit vector specifying certain general properties of the filter. + * @param cd_nelmts + * IN: Number of elements in cd_values + * @param cd_values + * IN: Auxiliary data for the filter. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - name or an array is null. + * + **/ public synchronized static native int H5Pmodify_filter(long plist, long filter, int flags, long cd_nelmts, int[] cd_values) throws HDF5LibraryException, NullPointerException; @@ -5844,9 +7542,37 @@ public class H5 implements java.io.Serializable { throws HDF5LibraryException, NullPointerException; + /** + * H5Pall_filters_avail query to verify that all the filters set + * in the dataset creation property list are available currently. + * + * @param dcpl_id + * IN: Property list identifier. + * + * @return + * TRUE if all filters available + * FALSE if one or more filters not currently available. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ public synchronized static native boolean H5Pall_filters_avail(long dcpl_id) throws HDF5LibraryException, NullPointerException; + /** + * H5Premove_filter deletes a filter from the dataset creation property list; + * deletes all filters if filter is H5Z_FILTER_NONE + * + * @param obj_id + * IN: Property list identifier. + * @param filter + * IN: Filter identifier. + * + * @return a non-negative value and the size of the user block; if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ public synchronized static native int H5Premove_filter(long obj_id, long filter) throws HDF5LibraryException; /** @@ -5864,6 +7590,18 @@ public class H5 implements java.io.Serializable { **/ public synchronized static native int H5Pset_deflate(long plist, int level) throws HDF5LibraryException; + /** + * H5Pset_fletcher32 sets Fletcher32 checksum of EDC for a dataset creation + * property list or group creation property list. + * + * @param plist + * IN: Property list identifier. + * + * @return a non-negative value and the size of the user block; if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ public synchronized static native int H5Pset_fletcher32(long plist) throws HDF5LibraryException, NullPointerException; @@ -6334,11 +8072,35 @@ public class H5 implements java.io.Serializable { */ public synchronized static native long H5Pget_driver(long plid) throws HDF5LibraryException; - public synchronized static native long H5Pget_family_offset(long fapl_id) throws HDF5LibraryException, - NullPointerException; + /** + * H5Pget_family_offset gets offset for family driver. + * + * @param fapl_id + * IN: File access property list identifier + * + * @return the offset. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * + **/ + public synchronized static native long H5Pget_family_offset(long fapl_id) throws HDF5LibraryException; - public synchronized static native int H5Pset_family_offset(long fapl_id, long offset) throws HDF5LibraryException, - NullPointerException; + /** + * H5Pset_family_offset sets the offset for family driver. + * + * @param fapl_id + * IN: File access property list identifier + * @param offset + * IN: the offset value + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * + **/ + public synchronized static native int H5Pset_family_offset(long fapl_id, long offset) throws HDF5LibraryException; /** * Retrieves the maximum possible number of elements in the meta data cache and the maximum possible number of bytes @@ -6389,9 +8151,8 @@ public class H5 implements java.io.Serializable { double rdcc_w0) throws HDF5LibraryException; /** - * H5Pget_mdc_config gets the initial metadata cache configuration contained in a file access property list and - * loads it into the instance of H5AC_cache_config_t pointed to by the config_ptr parameter. This configuration is - * used when the file is opened. + * H5Pget_mdc_config gets the initial metadata cache configuration contained in a file access property list. + * This configuration is used when the file is opened. * * @param plist_id * IN: Identifier of the file access property list. @@ -6403,6 +8164,19 @@ public class H5 implements java.io.Serializable { **/ public synchronized static native H5AC_cache_config_t H5Pget_mdc_config(long plist_id) throws HDF5LibraryException; + /** + * H5Pset_mdc_config sets the initial metadata cache configuration contained in a file access property list and + * loads it into the instance of H5AC_cache_config_t pointed to by the config_ptr parameter. This configuration is + * used when the file is opened. + * + * @param plist_id + * IN: Identifier of the file access property list. + * @param config_ptr + * IN: H5AC_cache_config_t, the initial metadata cache configuration. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ public synchronized static native void H5Pset_mdc_config(long plist_id, H5AC_cache_config_t config_ptr) throws HDF5LibraryException; @@ -6437,10 +8211,35 @@ public class H5 implements java.io.Serializable { public synchronized static native int H5Pset_gc_references(long fapl_id, boolean gc_ref) throws HDF5LibraryException; - public synchronized static native int H5Pget_fclose_degree(long plist_id) throws HDF5LibraryException, + /** + * H5Pget_fclose_degree returns the degree for the file close behavior for a file access + * property list. + * + * @param fapl_id + * IN File access property list + * + * @return the degree for the file close behavior + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native int H5Pget_fclose_degree(long fapl_id) throws HDF5LibraryException, NullPointerException; - public synchronized static native int H5Pset_fclose_degree(long plist, int degree) throws HDF5LibraryException, + /** + * H5Pset_fclose_degree sets the degree for the file close behavior. + * + * @param fapl_id + * IN File access property list + * @param degree + * IN the degree for the file close behavior + * + * @return non-negative if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native int H5Pset_fclose_degree(long fapl_id, int degree) throws HDF5LibraryException, NullPointerException; /** @@ -6471,8 +8270,40 @@ public class H5 implements java.io.Serializable { **/ public synchronized static native void H5Pset_meta_block_size(long fapl_id, long size) throws HDF5LibraryException; + /** + * H5Pget_sieve_buf_size retrieves the current settings for the data sieve buffer size + * property from a file access property list. + * + * @param fapl_id + * IN: Identifier for property list to query. + * + * @return a non-negative value and the size of the user block; if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ public synchronized static native long H5Pget_sieve_buf_size(long fapl_id) throws HDF5LibraryException; + /** + * H5Pset_sieve_buf_size Sets the maximum size of the data seive buffer used for file + * drivers which are capable of using data sieving. The data sieve + * buffer is used when performing I/O on datasets in the file. Using a + * buffer which is large anough to hold several pieces of the dataset + * being read in for hyperslab selections boosts performance by quite a + * bit. + *

+ * The default value is set to 64KB, indicating that file I/O for raw data + * reads and writes will occur in at least 64KB blocks. Setting the value to 0 + * with this function will turn off the data sieving + * + * @param fapl_id + * IN: Identifier of property list to modify. + * @param size + * IN: maximum size of the data seive buffer. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ public synchronized static native void H5Pset_sieve_buf_size(long fapl_id, long size) throws HDF5LibraryException; /** @@ -6733,17 +8564,39 @@ public class H5 implements java.io.Serializable { * @param dims * OUT: Array to store the chunk dimensions. * - * @return chunk dimensionality successful + * @return chunk dimensionality successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - dims array is null. + * @exception IllegalArgumentException + * - max_ndims <=0 + **/ + public synchronized static native int H5Pget_chunk(long plist, int max_ndims, long[] dims) + throws HDF5LibraryException, NullPointerException, IllegalArgumentException; + + /** + * H5Pset_chunk sets the size of the chunks used to store a chunked layout dataset. + * + * @param plist + * IN: Identifier for property list to query. + * @param ndims + * IN: The number of dimensions of each chunk. + * @param dim + * IN: An array containing the size of each chunk. + * + * @return a non-negative value if successful * * @exception HDF5LibraryException * - Error from the HDF-5 Library. * @exception NullPointerException * - dims array is null. * @exception IllegalArgumentException - * - max_ndims <=0 + * - dims <=0 **/ - public synchronized static native int H5Pget_chunk(long plist, int max_ndims, long[] dims) - throws HDF5LibraryException, NullPointerException, IllegalArgumentException; + public synchronized static native int H5Pset_chunk(long plist, int ndims, byte[] dim) throws HDF5LibraryException, + NullPointerException, IllegalArgumentException; /** * H5Pset_chunk sets the size of the chunks used to store a chunked layout dataset. @@ -6757,16 +8610,13 @@ public class H5 implements java.io.Serializable { * * @return a non-negative value if successful * - * @exception HDF5LibraryException + * @exception HDF5Exception * - Error from the HDF-5 Library. * @exception NullPointerException * - dims array is null. * @exception IllegalArgumentException * - dims <=0 **/ - public synchronized static native int H5Pset_chunk(long plist, int ndims, byte[] dim) throws HDF5LibraryException, - NullPointerException, IllegalArgumentException; - public synchronized static int H5Pset_chunk(long plist, int ndims, long[] dim) throws HDF5Exception, NullPointerException, IllegalArgumentException { if (dim == null) { @@ -7002,9 +8852,37 @@ public class H5 implements java.io.Serializable { **/ public synchronized static native int H5Pget_external_count(long plist) throws HDF5LibraryException; + /** + * H5Pset_szip Sets up the use of the szip filter. + * + * @param plist + * IN: Dataset creation property list identifier. + * @param options_mask + * IN: Bit vector specifying certain general properties of the filter. + * @param pixels_per_block + * IN: Number of pixels in blocks + * + * @return a non-negative value if successful; otherwise returns a negative value. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * + **/ public synchronized static native int H5Pset_szip(long plist, int options_mask, int pixels_per_block) throws HDF5LibraryException, NullPointerException; + /** + * H5Pset_shuffle Sets up the use of the shuffle filter. + * + * @param plist_id + * IN: Dataset creation property list identifier. + * + * @return a non-negative value if successful; otherwise returns a negative value. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * + **/ public synchronized static native int H5Pset_shuffle(long plist_id) throws HDF5LibraryException, NullPointerException; @@ -7132,20 +9010,91 @@ public class H5 implements java.io.Serializable { return retVal; } + /** + * H5Pset_fill_value checks if the fill value is defined for a dataset creation property list. + * + * @param plist_id + * IN: Property list identifier. + * @param status + * IN: The fill value setting: + * H5D_FILL_VALUE_UNDEFINED + * H5D_FILL_VALUE_DEFAULT + * H5D_FILL_VALUE_USER_DEFINED + * H5D_FILL_VALUE_ERROR + * + * @return a non-negative value if successful + * + * @exception HDF5Exception + * - Error converting data array + **/ public synchronized static native int H5Pfill_value_defined(long plist_id, int[] status) throws HDF5LibraryException, NullPointerException; + /** + * H5Pset_alloc_time Gets space allocation time for dataset during creation. + * + * @param plist_id + * IN: Dataset creation property list identifier. + * @param alloc_time + * OUT: allocation time. + * + * @return a non-negative value if successful; otherwise returns a negative value. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * + **/ public synchronized static native int H5Pget_alloc_time(long plist_id, int[] alloc_time) throws HDF5LibraryException, NullPointerException; + /** + * H5Pset_alloc_time Sets space allocation time for dataset during creation. + * + * @param plist_id + * IN: Dataset creation property list identifier. + * @param alloc_time + * IN: allocation time. + * + * @return a non-negative value if successful; otherwise returns a negative value. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * + **/ public synchronized static native int H5Pset_alloc_time(long plist_id, int alloc_time) throws HDF5LibraryException, NullPointerException; - public synchronized static native int H5Pget_fill_time(long plist_id, int[] fill_time) throws HDF5LibraryException, - NullPointerException; + /** + * H5Pset_fill_time Gets fill value writing time. + * + * @param plist_id + * IN: Dataset creation property list identifier. + * @param fill_time + * OUT: fill time. + * + * @return a non-negative value if successful; otherwise returns a negative value. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * + **/ + public synchronized static native int H5Pget_fill_time(long plist_id, int[] fill_time) throws HDF5LibraryException; - public synchronized static native int H5Pset_fill_time(long plist_id, int fill_time) throws HDF5LibraryException, - NullPointerException; + /** + * H5Pset_fill_time Sets the fill value writing time. + * + * @param plist_id + * IN: Dataset creation property list identifier. + * @param fill_time + * IN: fill time. + * + * @return a non-negative value if successful; otherwise returns a negative value. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * + **/ + public synchronized static native int H5Pset_fill_time(long plist_id, int fill_time) throws HDF5LibraryException; /** * H5Pset_chunk_opts Sets the edge chunk option in a dataset creation property list. @@ -7445,6 +9394,20 @@ public class H5 implements java.io.Serializable { public synchronized static native int H5Pget_buffer(long plist, byte[] tconv, byte[] bkg) throws HDF5LibraryException, IllegalArgumentException; + /** + * H5Pget_buffer_size gets type conversion and background buffer size, in bytes, if successful; + * otherwise 0 on failure. + * + * @param plist + * Identifier for the dataset transfer property list. + * + * @return buffer size, in bytes, if successful; otherwise 0 on failure + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception IllegalArgumentException + * - plist is invalid. + **/ public synchronized static native long H5Pget_buffer_size(long plist) throws HDF5LibraryException, IllegalArgumentException; @@ -7475,11 +9438,33 @@ public class H5 implements java.io.Serializable { public synchronized static native void H5Pset_buffer_size(long plist, long size) throws HDF5LibraryException, IllegalArgumentException; - public synchronized static native int H5Pget_edc_check(long plist) throws HDF5LibraryException, - NullPointerException; + /** + * H5Pget_edc_check gets the error-detecting algorithm in use. + * + * @param plist + * Identifier for the dataset transfer property list. + * + * @return the error-detecting algorithm + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native int H5Pget_edc_check(long plist) throws HDF5LibraryException; - public synchronized static native int H5Pset_edc_check(long plist, int check) throws HDF5LibraryException, - NullPointerException; + /** + * H5Pset_edc_check sets the error-detecting algorithm. + * + * @param plist + * Identifier for the dataset transfer property list. + * @param check + * the error-detecting algorithm to use. + * + * @return non-negative if succeed + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native int H5Pset_edc_check(long plist, int check) throws HDF5LibraryException; /** * H5Pget_btree_ratio Get the B-tree split ratios for a dataset transfer property list. @@ -7524,9 +9509,46 @@ public class H5 implements java.io.Serializable { public synchronized static native int H5Pset_btree_ratios(long plist_id, double left, double middle, double right) throws HDF5LibraryException; + /** + * H5Pget_hyper_vector_size reads values previously set with H5Pset_hyper_vector_size. + * + * @param dxpl_id + * IN: Dataset transfer property list identifier. + * @param vector_size + * OUT: hyper vector size. + * + * @return a non-negative value if successful; otherwise returns a negative value. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * + **/ public synchronized static native int H5Pget_hyper_vector_size(long dxpl_id, long[] vector_size) throws HDF5LibraryException, NullPointerException; + /** + * H5Pset_hyper_vector_size sets the number of + * "I/O vectors" (offset and length pairs) which are to be + * accumulated in memory before being issued to the lower levels + * of the library for reading or writing the actual data. + * Increasing the number should give better performance, but use + * more memory during hyperslab I/O. The vector size must be + * greater than 1. + *,p. + * The default is to use 1024 vectors for I/O during hyperslab + * reading/writing. + * + * @param dxpl_id + * IN: Dataset transfer property list identifier. + * @param vector_size + * IN: hyper vestor size. + * + * @return a non-negative value if successful; otherwise returns a negative value. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * + **/ public synchronized static native int H5Pset_hyper_vector_size(long dxpl_id, long vector_size) throws HDF5LibraryException, NullPointerException; @@ -7724,8 +9746,32 @@ public class H5 implements java.io.Serializable { // /////// String creation property list (STRCPL) routines /////// + /** + * H5Pget_char_encoding gets the character encoding of the string. + * + * @param plist_id + * IN: the property list identifier + * + * @return Returns the character encoding of the string. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * + **/ public synchronized static native int H5Pget_char_encoding(long plist_id) throws HDF5LibraryException; + /** + * H5Pset_char_encoding sets the character encoding of the string. + * + * @param plist_id + * IN: the property list identifier + * @param encoding + * IN: the character encoding of the string + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * + **/ public synchronized static native void H5Pset_char_encoding(long plist_id, int encoding) throws HDF5LibraryException; @@ -7910,25 +9956,131 @@ public class H5 implements java.io.Serializable { * - Error from the HDF-5 Library. * **/ - public synchronized static native void H5Pset_copy_object(long ocp_plist_id, int copy_options) - throws HDF5LibraryException; - - // /////// file drivers property list routines /////// - - public synchronized static native void H5Pget_fapl_core(long fapl_id, long[] increment, boolean[] backing_store) - throws HDF5LibraryException, NullPointerException; - - public synchronized static native int H5Pset_fapl_core(long fapl_id, long increment, boolean backing_store) + public synchronized static native void H5Pset_copy_object(long ocp_plist_id, int copy_options) + throws HDF5LibraryException; + + // /////// file drivers property list routines /////// + + /** + * H5Pget_fapl_core retrieve H5FD_CORE I/O settings. + * + * @param fapl_id + * IN: File access property list identifier + * @param increment + * OUT: how much to grow the memory each time + * @param backing_store + * OUT: write to file name on flush setting + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * + **/ + public synchronized static native void H5Pget_fapl_core(long fapl_id, long[] increment, boolean[] backing_store) + throws HDF5LibraryException, NullPointerException; + + /** + * H5Pset_fapl_core modifies the file access property list to use the H5FD_CORE driver. + * + * @param fapl_id + * IN: File access property list identifier + * @param increment + * IN: how much to grow the memory each time + * @param backing_store + * IN: write to file name on flush setting + * + * @return a non-negative value if successful; otherwise returns a negative value. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * + **/ + public synchronized static native int H5Pset_fapl_core(long fapl_id, long increment, boolean backing_store) + throws HDF5LibraryException, NullPointerException; + + /** + * H5Pget_fapl_direct queries properties set by the H5Pset_fapl_direct. + * + * @param fapl_id + * IN: File access property list identifier + * @param info + * OUT: Returned property list information + * info[0] = increment -how much to grow the memory each time + * info[1] = backing_store - write to file name on flush setting + * + * @return a non-negative value if successful; otherwise returns a negative value. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * + **/ + public synchronized static native int H5Pget_fapl_direct(long fapl_id, long[] info) throws HDF5LibraryException; + + /** + * H5Pset_fapl_direct Sets up use of the direct I/O driver. + * + * @param fapl_id + * IN: File access property list identifier + * @param alignment + * IN: Required memory alignment boundary + * @param block_size + * IN: File system block size + * @param cbuf_size + * IN: Copy buffer size + * + * @return a non-negative value if successful; otherwise returns a negative value. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * + **/ + public synchronized static native int H5Pset_fapl_direct(long fapl_id, long alignment, long block_size, + long cbuf_size) throws HDF5LibraryException; + + /** + * H5Pget_fapl_family Returns information about the family file access property list. + * + * @param fapl_id + * IN: File access property list identifier + * @param memb_size + * OUT: the size in bytes of each file member (used only when creating a new file) + * @param memb_fapl_id + * OUT: the file access property list to be used for each family member + * + * @return a non-negative value if successful; otherwise returns a negative value. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * + **/ + public synchronized static native int H5Pget_fapl_family(long fapl_id, long[] memb_size, long[] memb_fapl_id) + throws HDF5LibraryException, NullPointerException; + + /** + * H5Pset_fapl_family Sets up use of the direct I/O driver. + * + * @param fapl_id + * IN: File access property list identifier + * @param memb_size + * IN: the size in bytes of each file member (used only when creating a new file) + * @param memb_fapl_id + * IN: the file access property list to be used for each family member + * + * @return a non-negative value if successful; otherwise returns a negative value. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * + **/ + public synchronized static native int H5Pset_fapl_family(long fapl_id, long memb_size, long memb_fapl_id) throws HDF5LibraryException, NullPointerException; /** - * H5Pget_fapl_direct Retrieve direct I/O settings. + * H5Pset_fapl_hdfs Modify the file access property list to use the H5FD_HDFS driver. * * @param fapl_id * IN: File access property list identifier - * @param info - * OUT: Returned property list information info[0] = alignment Required memory alignment boundary info[1] - * = block_size File system block size info[2] = cbuf_size Copy buffer size + * @param fapl_conf + * IN: the properties of the hdfs driver * * @return a non-negative value if successful; otherwise returns a negative value. * @@ -7936,37 +10088,20 @@ public class H5 implements java.io.Serializable { * - Error from the HDF-5 Library. * **/ - public synchronized static native int H5Pget_fapl_direct(long fapl_id, long[] info) throws HDF5LibraryException; + public synchronized static native int H5Pset_fapl_hdfs(long fapl_id, H5FD_hdfs_fapl_t fapl_conf) throws HDF5LibraryException, NullPointerException; /** - * H5Pset_fapl_direct Sets up use of the direct I/O driver. + * H5Pget_fapl_hdfs gets the properties hdfs I/O driver. * * @param fapl_id * IN: File access property list identifier - * @param alignment - * IN: Required memory alignment boundary - * @param block_size - * IN: File system block size - * @param cbuf_size - * IN: Copy buffer size * - * @return a non-negative value if successful; otherwise returns a negative value. + * @return the properties of the hdfs driver. * * @exception HDF5LibraryException * - Error from the HDF-5 Library. * **/ - public synchronized static native int H5Pset_fapl_direct(long fapl_id, long alignment, long block_size, - long cbuf_size) throws HDF5LibraryException; - - public synchronized static native int H5Pget_fapl_family(long fapl_id, long[] memb_size, long[] memb_fapl_id) - throws HDF5LibraryException, NullPointerException; - - public synchronized static native int H5Pset_fapl_family(long fapl_id, long memb_size, long memb_fapl_id) - throws HDF5LibraryException, NullPointerException; - - public synchronized static native int H5Pset_fapl_hdfs(long fapl_id, H5FD_hdfs_fapl_t fapl_conf) throws HDF5LibraryException, NullPointerException; - public synchronized static native H5FD_hdfs_fapl_t H5Pget_fapl_hdfs(long fapl_id) throws HDF5LibraryException, NullPointerException; /** @@ -8044,17 +10179,99 @@ public class H5 implements java.io.Serializable { public synchronized static native void H5Pset_fapl_log(long fapl_id, String logfile, long flags, long buf_size) throws HDF5LibraryException, NullPointerException; + /** + * H5Pset_fapl_sec2 Sets up use of the sec2 I/O driver. + * + * @param fapl_id + * IN: File access property list identifier + * + * @return a non-negative value if successful; otherwise returns a negative value. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * + **/ public synchronized static native int H5Pset_fapl_sec2(long fapl_id) throws HDF5LibraryException, NullPointerException; + /** + * H5Pset_fapl_split Sets up use of the split I/O driver. Makes the multi driver act like the + * old split driver which stored meta data in one file and raw + * data in another file + * + * @param fapl_id + * IN: File access property list identifier + * @param meta_ext + * IN: meta filename extension + * @param meta_plist_id + * IN: File access property list identifier for metadata + * @param raw_ext + * IN: raw data filename extension + * @param raw_plist_id + * IN: File access property list identifier raw data + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * + **/ public synchronized static native void H5Pset_fapl_split(long fapl_id, String meta_ext, long meta_plist_id, String raw_ext, long raw_plist_id) throws HDF5LibraryException, NullPointerException; + /** + * H5Pset_fapl_stdio Sets up use of the stdio I/O driver. + * + * @param fapl_id + * IN: File access property list identifier + * + * @return a non-negative value if successful; otherwise returns a negative value. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * + **/ public synchronized static native int H5Pset_fapl_stdio(long fapl_id) throws HDF5LibraryException, NullPointerException; + /** + * H5Pset_fapl_windows Sets up use of the windows I/O driver. + * + * @param fapl_id + * IN: File access property list identifier + * + * @return a non-negative value if successful; otherwise returns a negative value. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * + **/ public synchronized static native int H5Pset_fapl_windows(long fapl_id) throws HDF5LibraryException, NullPointerException; + /** + * H5Pset_fapl_ros3 Modify the file access property list to use the H5FD_ROS3 driver. + * + * @param fapl_id + * IN: File access property list identifier + * @param fapl_conf + * IN: the properties of the ros3 driver + * + * @return a non-negative value if successful; otherwise returns a negative value. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * + **/ public synchronized static native int H5Pset_fapl_ros3(long fapl_id, H5FD_ros3_fapl_t fapl_conf) throws HDF5LibraryException, NullPointerException; + /** + * H5Pget_fapl_ros3 gets the properties of the ros3 I/O driver. + * + * @param fapl_id + * IN: File access property list identifier + * + * @return the properties of the ros3 driver. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * + **/ public synchronized static native H5FD_ros3_fapl_t H5Pget_fapl_ros3(long fapl_id) throws HDF5LibraryException, NullPointerException; // /////// unimplemented //////// @@ -8762,50 +10979,7 @@ public class H5 implements java.io.Serializable { // // // //////////////////////////////////////////////////////////// - /** - * H5Sclose releases a dataspace. - * - * @param space_id - * Identifier of dataspace to release. - * - * @return a non-negative value if successful - * - * @exception HDF5LibraryException - * - Error from the HDF-5 Library. - **/ - public static int H5Sclose(long space_id) throws HDF5LibraryException { - if (space_id < 0) - return 0; // throw new HDF5LibraryException("Negative ID");; - - log.trace("OPEN_IDS: H5Sclose remove {}", space_id); - OPEN_IDS.remove(space_id); - log.trace("OPEN_IDS: {}", OPEN_IDS.size()); - return _H5Sclose(space_id); - } - - private synchronized static native int _H5Sclose(long space_id) throws HDF5LibraryException; - - /** - * H5Scopy creates a new dataspace which is an exact copy of the dataspace identified by space_id. - * - * @param space_id - * Identifier of dataspace to copy. - * @return a dataspace identifier if successful - * - * @exception HDF5LibraryException - * - Error from the HDF-5 Library. - **/ - public static long H5Scopy(long space_id) throws HDF5LibraryException { - long id = _H5Scopy(space_id); - if (id > 0) { - log.trace("OPEN_IDS: H5Scopy add {}", id); - OPEN_IDS.add(id); - log.trace("OPEN_IDS: {}", OPEN_IDS.size()); - } - return id; - } - - private synchronized static native long _H5Scopy(long space_id) throws HDF5LibraryException; + /**************** Operations on dataspaces ********************/ /** * H5Screate creates a new dataspace of a particular type. @@ -8862,169 +11036,257 @@ public class H5 implements java.io.Serializable { throws HDF5Exception, NullPointerException; /** + * H5Sset_extent_simple sets or resets the size of an existing dataspace. + * + * @param space_id + * Dataspace identifier. + * @param rank + * Rank, or dimensionality, of the dataspace. + * @param current_size + * Array containing current size of dataspace. + * @param maximum_size + * Array containing maximum size of dataspace. + * + * @return a dataspace identifier if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native long H5Sset_extent_simple(long space_id, int rank, long[] current_size, + long[] maximum_size) throws HDF5LibraryException, NullPointerException; + + /** + * H5Sset_extent_simple sets or resets the size of an existing dataspace. + * + * @param space_id + * Dataspace identifier. + * @param rank + * Rank, or dimensionality, of the dataspace. + * @param current_size + * Array containing current size of dataspace. + * @param maximum_size + * Array containing maximum size of dataspace. + * + * @return a dataspace identifier if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static long H5Sset_extent_simple(long space_id, int rank, byte[] current_size, + byte[] maximum_size) throws HDF5LibraryException, NullPointerException { + ByteBuffer csbb = ByteBuffer.wrap(current_size); + long[] lacs = (csbb.asLongBuffer()).array(); + ByteBuffer maxsbb = ByteBuffer.wrap(maximum_size); + long[] lamaxs = (maxsbb.asLongBuffer()).array(); + + return H5Sset_extent_simple(space_id, rank, lacs, lamaxs); + } + + /** + * H5Scopy creates a new dataspace which is an exact copy of the dataspace identified by space_id. + * + * @param space_id + * Identifier of dataspace to copy. + * @return a dataspace identifier if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public static long H5Scopy(long space_id) throws HDF5LibraryException { + long id = _H5Scopy(space_id); + if (id > 0) { + log.trace("OPEN_IDS: H5Scopy add {}", id); + OPEN_IDS.add(id); + log.trace("OPEN_IDS: {}", OPEN_IDS.size()); + } + return id; + } + + private synchronized static native long _H5Scopy(long space_id) throws HDF5LibraryException; + + /** + * H5Sclose releases a dataspace. + * + * @param space_id + * Identifier of dataspace to release. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public static int H5Sclose(long space_id) throws HDF5LibraryException { + if (space_id < 0) + return 0; // throw new HDF5LibraryException("Negative ID");; + + log.trace("OPEN_IDS: H5Sclose remove {}", space_id); + OPEN_IDS.remove(space_id); + log.trace("OPEN_IDS: {}", OPEN_IDS.size()); + return _H5Sclose(space_id); + } + + private synchronized static native int _H5Sclose(long space_id) throws HDF5LibraryException; + + /** + * H5Sencode converts a data space description into binary form in a buffer. + * + * @param obj_id + * IN: Identifier of the object to be encoded. + * + * @return the buffer for the object to be encoded into. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native byte[] H5Sencode(long obj_id) throws HDF5LibraryException, NullPointerException; + + /** * H5Sdecode reconstructs the HDF5 data space object and returns a new object handle for it. * * @param buf * IN: Buffer for the data space object to be decoded. * - * @return a new object handle + * @return a new object handle + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - buf is null. + **/ + public synchronized static native long H5Sdecode(byte[] buf) throws HDF5LibraryException, NullPointerException; + + /** + * H5Sget_simple_extent_npoints determines the number of elements in a dataspace. + * + * @param space_id + * ID of the dataspace object to query + * @return the number of elements in the dataspace if successful * * @exception HDF5LibraryException * - Error from the HDF-5 Library. - * @exception NullPointerException - * - buf is null. **/ - public synchronized static native long H5Sdecode(byte[] buf) throws HDF5LibraryException, NullPointerException; + public synchronized static native long H5Sget_simple_extent_npoints(long space_id) throws HDF5LibraryException; /** - * H5Sencode converts a data space description into binary form in a buffer. + * H5Sget_simple_extent_ndims determines the dimensionality (or rank) of a dataspace. * - * @param obj_id - * IN: Identifier of the object to be encoded. + * @param space_id + * IN: Identifier of the dataspace * - * @return the buffer for the object to be encoded into. + * @return the number of dimensions in the dataspace if successful * * @exception HDF5LibraryException * - Error from the HDF-5 Library. **/ - public synchronized static native byte[] H5Sencode(long obj_id) throws HDF5LibraryException, NullPointerException; + public synchronized static native int H5Sget_simple_extent_ndims(long space_id) throws HDF5LibraryException; /** - * H5Sextent_copy copies the extent from source_space_id to dest_space_id. This action may change the type of the - * dataspace. + * H5Sget_simple_extent_dims returns the size and maximum sizes of each dimension of a dataspace through the dims + * and maxdims parameters. * - * @param dest_space_id - * IN: The identifier for the dataspace from which the extent is copied. - * @param source_space_id - * IN: The identifier for the dataspace to which the extent is copied. + * @param space_id + * IN: Identifier of the dataspace object to query + * @param dims + * OUT: Pointer to array to store the size of each dimension. + * @param maxdims + * OUT: Pointer to array to store the maximum size of each dimension. * - * @return a non-negative value if successful + * @return the number of dimensions in the dataspace if successful * * @exception HDF5LibraryException * - Error from the HDF-5 Library. + * @exception NullPointerException + * - dims or maxdims is null. **/ - public synchronized static native int H5Sextent_copy(long dest_space_id, long source_space_id) - throws HDF5LibraryException; + public synchronized static native int H5Sget_simple_extent_dims(long space_id, long[] dims, long[] maxdims) + throws HDF5LibraryException, NullPointerException; /** - * H5Sextent_equal determines whether the dataspace extents of two dataspaces, space1_id and space2_id, are equal. + * H5Sis_simple determines whether a dataspace is a simple dataspace. * - * @param first_space_id - * IN: The identifier for the first dataspace. - * @param second_space_id - * IN: The identifier for the seconddataspace. + * @param space_id + * Identifier of the dataspace to query * - * @return true if successful, else false + * @return true if is a simple dataspace * * @exception HDF5LibraryException * - Error from the HDF-5 Library. **/ - public synchronized static native boolean H5Sextent_equal(long first_space_id, long second_space_id) - throws HDF5LibraryException; + public synchronized static native boolean H5Sis_simple(long space_id) throws HDF5LibraryException; /** - * H5Sget_select_bounds retrieves the coordinates of the bounding box containing the current selection and places - * them into user-supplied buffers. - *

- * The start and end buffers must be large enough to hold the dataspace rank number of coordinates. + * H5Sget_simple_extent_type queries a dataspace to determine the current class of a dataspace. * - * @param spaceid - * Identifier of dataspace to release. - * @param start - * coordinates of lowest corner of bounding box. - * @param end - * coordinates of highest corner of bounding box. + * @param space_id + * Dataspace identifier. * - * @return a non-negative value if successful,with start and end initialized. + * @return a dataspace class name if successful * * @exception HDF5LibraryException * - Error from the HDF-5 Library. - * @exception NullPointerException - * - start or end is null. **/ - public synchronized static native int H5Sget_select_bounds(long spaceid, long[] start, long[] end) - throws HDF5LibraryException, NullPointerException; + public synchronized static native int H5Sget_simple_extent_type(long space_id) throws HDF5LibraryException; /** - * H5Sget_select_elem_npoints returns the number of element points in the current dataspace selection. + * H5Sset_extent_none removes the extent from a dataspace and sets the type to H5S_NONE. * - * @param spaceid - * Identifier of dataspace to release. + * @param space_id + * The identifier for the dataspace from which the extent is to be removed. * * @return a non-negative value if successful * * @exception HDF5LibraryException * - Error from the HDF-5 Library. **/ - public synchronized static native long H5Sget_select_elem_npoints(long spaceid) throws HDF5LibraryException; + public synchronized static native int H5Sset_extent_none(long space_id) throws HDF5LibraryException; /** - * H5Sget_select_elem_pointlist returns an array of of element points in the current dataspace selection. The point - * coordinates have the same dimensionality (rank) as the dataspace they are located within, one coordinate per - * point. + * H5Sextent_copy copies the extent from source_space_id to dest_space_id. This action may change the type of the + * dataspace. * - * @param spaceid - * Identifier of dataspace to release. - * @param startpoint - * first point to retrieve - * @param numpoints - * number of points to retrieve - * @param buf - * returns points startblock to startblock+num-1, each points is rank longs. + * @param dest_space_id + * IN: The identifier for the dataspace from which the extent is copied. + * @param source_space_id + * IN: The identifier for the dataspace to which the extent is copied. * * @return a non-negative value if successful * * @exception HDF5LibraryException * - Error from the HDF-5 Library. - * @exception NullPointerException - * - buf is null. **/ - public synchronized static native int H5Sget_select_elem_pointlist(long spaceid, long startpoint, long numpoints, - long[] buf) throws HDF5LibraryException, NullPointerException; + public synchronized static native int H5Sextent_copy(long dest_space_id, long source_space_id) + throws HDF5LibraryException; /** - * H5Sget_select_hyper_blocklist returns an array of hyperslab blocks. The block coordinates have the same - * dimensionality (rank) as the dataspace they are located within. The list of blocks is formatted as follows: - * - *

-     *    <"start" coordinate>, immediately followed by
-     *    <"opposite" corner coordinate>, followed by
-     *   the next "start" and "opposite" coordinates,
-     *   etc.
-     *   until all of the selected blocks have been listed.
-     * 
+ * H5Sextent_equal determines whether the dataspace extents of two dataspaces, space1_id and space2_id, are equal. * - * @param spaceid - * Identifier of dataspace to release. - * @param startblock - * first block to retrieve - * @param numblocks - * number of blocks to retrieve - * @param buf - * returns blocks startblock to startblock+num-1, each block is rank * 2 (corners) longs. + * @param first_space_id + * IN: The identifier for the first dataspace. + * @param second_space_id + * IN: The identifier for the seconddataspace. * - * @return a non-negative value if successful + * @return true if successful, else false * * @exception HDF5LibraryException * - Error from the HDF-5 Library. - * @exception NullPointerException - * - buf is null. **/ - public synchronized static native int H5Sget_select_hyper_blocklist(long spaceid, long startblock, long numblocks, - long[] buf) throws HDF5LibraryException, NullPointerException; + public synchronized static native boolean H5Sextent_equal(long first_space_id, long second_space_id) + throws HDF5LibraryException; + + /***************** Operations on dataspace selections *****************/ /** - * H5Sget_select_hyper_nblocks returns the number of hyperslab blocks in the current dataspace selection. + * H5Sget_select_type retrieves the type of selection currently defined for the dataspace space_id. * - * @param spaceid - * Identifier of dataspace to release. + * @param space_id + * IN: Identifier of the dataspace object to query * - * @return a non-negative value if successful + * @return the dataspace selection type if successful * * @exception HDF5LibraryException * - Error from the HDF-5 Library. **/ - public synchronized static native long H5Sget_select_hyper_nblocks(long spaceid) throws HDF5LibraryException; + public synchronized static native int H5Sget_select_type(long space_id) throws HDF5LibraryException; /** * H5Sget_select_npoints determines the number of elements in the current selection of a dataspace. @@ -9040,89 +11302,123 @@ public class H5 implements java.io.Serializable { public synchronized static native long H5Sget_select_npoints(long space_id) throws HDF5LibraryException; /** - * H5Sget_select_type retrieves the type of selection currently defined for the dataspace space_id. + * H5Sselect_copy copies all the selection information (including offset) from the source + * dataspace to the destination dataspace. + * @param dst_id ID of the destination dataspace + * @param src_id ID of the source dataspace + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native void H5Sselect_copy(long dst_id, long src_id) throws HDF5LibraryException; + + /** + * H5Sselect_valid verifies that the selection for the dataspace. * * @param space_id - * IN: Identifier of the dataspace object to query + * The identifier for the dataspace in which the selection is being reset. * - * @return the dataspace selection type if successful + * @return true if the selection is contained within the extent and FALSE if it is not or is an error. * * @exception HDF5LibraryException * - Error from the HDF-5 Library. **/ - public synchronized static native int H5Sget_select_type(long space_id) throws HDF5LibraryException; + public synchronized static native boolean H5Sselect_valid(long space_id) throws HDF5LibraryException; /** - * H5Sget_simple_extent_dims returns the size and maximum sizes of each dimension of a dataspace through the dims - * and maxdims parameters. + * H5Sselect_adjust moves a selection by subtracting an offset from it. * * @param space_id - * IN: Identifier of the dataspace object to query - * @param dims - * OUT: Pointer to array to store the size of each dimension. - * @param maxdims - * OUT: Pointer to array to store the maximum size of each dimension. - * - * @return the number of dimensions in the dataspace if successful + * ID of dataspace to adjust + * @param offset + * Offset to subtract * * @exception HDF5LibraryException * - Error from the HDF-5 Library. * @exception NullPointerException - * - dims or maxdims is null. + * - offset is null. **/ - public synchronized static native int H5Sget_simple_extent_dims(long space_id, long[] dims, long[] maxdims) - throws HDF5LibraryException, NullPointerException; + public synchronized static native void H5Sselect_adjust(long space_id, long[][] offset) + throws HDF5LibraryException, NullPointerException; /** - * H5Sget_simple_extent_ndims determines the dimensionality (or rank) of a dataspace. + * H5Sget_select_bounds retrieves the coordinates of the bounding box containing the current selection and places + * them into user-supplied buffers. + *

+ * The start and end buffers must be large enough to hold the dataspace rank number of coordinates. * * @param space_id - * IN: Identifier of the dataspace + * Identifier of dataspace to release. + * @param start + * coordinates of lowest corner of bounding box. + * @param end + * coordinates of highest corner of bounding box. * - * @return the number of dimensions in the dataspace if successful + * @return a non-negative value if successful,with start and end initialized. * * @exception HDF5LibraryException * - Error from the HDF-5 Library. + * @exception NullPointerException + * - start or end is null. **/ - public synchronized static native int H5Sget_simple_extent_ndims(long space_id) throws HDF5LibraryException; + public synchronized static native int H5Sget_select_bounds(long space_id, long[] start, long[] end) + throws HDF5LibraryException, NullPointerException; /** - * H5Sget_simple_extent_npoints determines the number of elements in a dataspace. + * H5Sselect_shape_same checks to see if the current selection in the dataspaces are the same + * dimensionality and shape. + * This is primarily used for reading the entire selection in one swoop. * - * @param space_id - * ID of the dataspace object to query - * @return the number of elements in the dataspace if successful + * @param space1_id ID of 1st Dataspace pointer to compare + * @param space2_id ID of 2nd Dataspace pointer to compare + * + * @return true if the selection is the same dimensionality and shape; + * false otherwise * * @exception HDF5LibraryException * - Error from the HDF-5 Library. **/ - public synchronized static native long H5Sget_simple_extent_npoints(long space_id) throws HDF5LibraryException; + public synchronized static native boolean H5Sselect_shape_same(long space1_id, long space2_id) throws HDF5LibraryException; /** - * H5Sget_simple_extent_type queries a dataspace to determine the current class of a dataspace. + * H5Sselect_intersect_block checks to see if the current selection in the + * dataspace intersects with the block given. * * @param space_id - * Dataspace identifier. + * ID of dataspace pointer to compare + * @param start + * Starting coordinate of block + * @param end + * Opposite ("ending") coordinate of block * - * @return a dataspace class name if successful + * @return a TRUE if the current selection in the dataspace intersects with the block given + * FALSE otherwise * * @exception HDF5LibraryException * - Error from the HDF-5 Library. + * @exception NullPointerException + * - offset is null. **/ - public synchronized static native int H5Sget_simple_extent_type(long space_id) throws HDF5LibraryException; + public synchronized static native boolean H5Sselect_intersect_block(long space_id, long[] start, long[] end) + throws HDF5LibraryException, NullPointerException; /** - * H5Sis_simple determines whether a dataspace is a simple dataspace. + * H5Soffset_simple sets the offset of a simple dataspace space_id. * * @param space_id - * Identifier of the dataspace to query + * IN: The identifier for the dataspace object to reset. + * @param offset + * IN: The offset at which to position the selection. * - * @return true if is a simple dataspace + * @return a non-negative value if successful * * @exception HDF5LibraryException * - Error from the HDF-5 Library. + * @exception NullPointerException + * - offset array is null. **/ - public synchronized static native boolean H5Sis_simple(long space_id) throws HDF5LibraryException; + public synchronized static native int H5Soffset_simple(long space_id, byte[] offset) throws HDF5LibraryException, + NullPointerException; /** * H5Soffset_simple sets the offset of a simple dataspace space_id. @@ -9139,9 +11435,6 @@ public class H5 implements java.io.Serializable { * @exception NullPointerException * - offset array is null. **/ - public synchronized static native int H5Soffset_simple(long space_id, byte[] offset) throws HDF5LibraryException, - NullPointerException; - public synchronized static int H5Soffset_simple(long space_id, long[] offset) throws HDF5Exception, NullPointerException { if (offset == null) { @@ -9172,6 +11465,18 @@ public class H5 implements java.io.Serializable { public synchronized static native int H5Sselect_all(long space_id) throws HDF5LibraryException; /** + * H5Sselect_none resets the selection region for the dataspace space_id to include no elements. + * + * @param space_id + * IN: The identifier of the dataspace to be reset. + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native int H5Sselect_none(long space_id) throws HDF5LibraryException; + + /** * H5Sselect_elements selects array elements to be included in the selection for the space_id dataspace. * * @param space_id @@ -9229,6 +11534,43 @@ public class H5 implements java.io.Serializable { } /** + * H5Sget_select_elem_npoints returns the number of element points in the current dataspace selection. + * + * @param spaceid + * Identifier of dataspace to release. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native long H5Sget_select_elem_npoints(long spaceid) throws HDF5LibraryException; + + /** + * H5Sget_select_elem_pointlist returns an array of of element points in the current dataspace selection. The point + * coordinates have the same dimensionality (rank) as the dataspace they are located within, one coordinate per + * point. + * + * @param spaceid + * Identifier of dataspace to release. + * @param startpoint + * first point to retrieve + * @param numpoints + * number of points to retrieve + * @param buf + * returns points startblock to startblock+num-1, each points is rank longs. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - buf is null. + **/ + public synchronized static native int H5Sget_select_elem_pointlist(long spaceid, long startpoint, long numpoints, + long[] buf) throws HDF5LibraryException, NullPointerException; + + /** * H5Sselect_hyperslab selects a hyperslab region to add to the current selected region for the dataspace specified * by space_id. The start, stride, count, and block arrays must be the same size as the rank of the dataspace. * @@ -9268,76 +11610,118 @@ public class H5 implements java.io.Serializable { return H5Sselect_hyperslab(space_id, op, lastart, lastride, lacount, lablock); } - public synchronized static native int H5Sselect_hyperslab(long space_id, int op, long[] start, long[] stride, - long[] count, long[] block) throws HDF5LibraryException, NullPointerException, IllegalArgumentException; - /** - * H5Sselect_none resets the selection region for the dataspace space_id to include no elements. + * H5Sselect_hyperslab selects a hyperslab region to add to the current selected region for the dataspace specified + * by space_id. The start, stride, count, and block arrays must be the same size as the rank of the dataspace. * * @param space_id - * IN: The identifier of the dataspace to be reset. + * IN: Identifier of dataspace selection to modify + * @param op + * IN: Operation to perform on current selection. + * @param start + * IN: Offset of start of hyperslab + * @param stride + * IN: Hyperslab stride. + * @param count + * IN: Number of blocks included in hyperslab. + * @param block + * IN: Size of block in hyperslab. + * * @return a non-negative value if successful * * @exception HDF5LibraryException * - Error from the HDF-5 Library. + * @exception NullPointerException + * - an input array is null. + * @exception IllegalArgumentException + * - an input array is invalid. **/ - public synchronized static native int H5Sselect_none(long space_id) throws HDF5LibraryException; + public synchronized static native int H5Sselect_hyperslab(long space_id, int op, long[] start, long[] stride, + long[] count, long[] block) throws HDF5LibraryException, NullPointerException, IllegalArgumentException; + /** - * H5Sselect_valid verifies that the selection for the dataspace. + * H5Scombine_hyperslab combines a hyperslab selection with the current selection for a dataspace, + * creating a new dataspace to return the generated selection. + * If the current selection is not a hyperslab, it is freed and the hyperslab + * parameters passed in are combined with the H5S_SEL_ALL hyperslab (ie. a + * selection composing the entire current extent). If STRIDE or BLOCK is + * NULL, they are assumed to be set to all '1'. * * @param space_id - * The identifier for the dataspace in which the selection is being reset. + * IN: Dataspace ID of selection to use + * @param op + * IN: Operation to perform on current selection. + * @param start + * IN: Offset of start of hyperslab + * @param stride + * IN: Hyperslab stride. + * @param count + * IN: Number of blocks included in hyperslab. + * @param block + * IN: Size of block in hyperslab. * - * @return true if the selection is contained within the extent and FALSE if it is not or is an error. + * @return a dataspace ID on success / H5I_INVALID_HID on failure * * @exception HDF5LibraryException * - Error from the HDF-5 Library. + * @exception NullPointerException + * - an input array is null. + * @exception IllegalArgumentException + * - an input array is invalid. **/ - public synchronized static native boolean H5Sselect_valid(long space_id) throws HDF5LibraryException; + public synchronized static native long H5Scombine_hyperslab(long space_id, int op, long[] start, long[] stride, + long[] count, long[] block) throws HDF5LibraryException, NullPointerException, IllegalArgumentException; /** - * H5Sset_extent_none removes the extent from a dataspace and sets the type to H5S_NONE. + * H5Smodify_select refine an existing hyperslab selection with an operation, using a second + * hyperslab. The first selection is modified to contain the result of + * space1 operated on by space2. * - * @param space_id - * The identifier for the dataspace from which the extent is to be removed. + * @param space1_id + * ID of the destination dataspace + * @param op + * Operation to perform on current selection. + * @param space2_id + * ID of the source dataspace * - * @return a non-negative value if successful + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native void H5Smodify_select(long space1_id, int op, long space2_id) throws HDF5LibraryException; + + /** + * H5Scombine_select combines two existing hyperslab selections with an operation, returning + * a new dataspace with the resulting selection. The dataspace extent from + * space1 is copied for the dataspace extent of the newly created dataspace. + * + * @param space1_id + * ID of the first dataspace + * @param op + * Operation to perform on current selection. + * @param space2_id + * ID of the second dataspace + * + * @return a dataspace ID on success / H5I_INVALID_HID on failure * * @exception HDF5LibraryException * - Error from the HDF-5 Library. **/ - public synchronized static native int H5Sset_extent_none(long space_id) throws HDF5LibraryException; + public synchronized static native long H5Scombine_select(long space1_id, int op, long space2_id) throws HDF5LibraryException; /** - * H5Sset_extent_simple sets or resets the size of an existing dataspace. + * H5Sis_regular_hyperslab retrieves a regular hyperslab selection for the dataspace specified + * by space_id. * * @param space_id - * Dataspace identifier. - * @param rank - * Rank, or dimensionality, of the dataspace. - * @param current_size - * Array containing current size of dataspace. - * @param maximum_size - * Array containing maximum size of dataspace. + * IN: Identifier of dataspace selection to query * - * @return a dataspace identifier if successful + * @return a TRUE/FALSE for hyperslab selection if successful * * @exception HDF5LibraryException * - Error from the HDF-5 Library. **/ - public synchronized static native long H5Sset_extent_simple(long space_id, int rank, long[] current_size, - long[] maximum_size) throws HDF5LibraryException, NullPointerException; - - public synchronized static long H5Sset_extent_simple(long space_id, int rank, byte[] current_size, - byte[] maximum_size) throws HDF5LibraryException, NullPointerException { - ByteBuffer csbb = ByteBuffer.wrap(current_size); - long[] lacs = (csbb.asLongBuffer()).array(); - ByteBuffer maxsbb = ByteBuffer.wrap(maximum_size); - long[] lamaxs = (maxsbb.asLongBuffer()).array(); - - return H5Sset_extent_simple(space_id, rank, lacs, lamaxs); - } + public synchronized static native boolean H5Sis_regular_hyperslab(long space_id) throws HDF5LibraryException; /** * H5Sget_regular_hyperslab determines if a hyperslab selection is regular for the dataspace specified @@ -9363,33 +11747,82 @@ public class H5 implements java.io.Serializable { **/ public synchronized static native void H5Sget_regular_hyperslab(long space_id, long[] start, long[] stride, long[] count, long[] block) throws HDF5LibraryException, NullPointerException, IllegalArgumentException; + /** + * H5Sget_select_hyper_nblocks returns the number of hyperslab blocks in the current dataspace selection. + * + * @param spaceid + * Identifier of dataspace to release. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native long H5Sget_select_hyper_nblocks(long spaceid) throws HDF5LibraryException; + /** - * H5Sis_regular_hyperslab retrieves a regular hyperslab selection for the dataspace specified - * by space_id. + * H5Sget_select_hyper_blocklist returns an array of hyperslab blocks. The block coordinates have the same + * dimensionality (rank) as the dataspace they are located within. The list of blocks is formatted as follows: * - * @param space_id - * IN: Identifier of dataspace selection to query + *

+     *    <"start" coordinate>, immediately followed by
+     *    <"opposite" corner coordinate>, followed by
+     *   the next "start" and "opposite" coordinates,
+     *   etc.
+     *   until all of the selected blocks have been listed.
+     * 
* - * @return a TRUE/FALSE for hyperslab selection if successful + * @param spaceid + * Identifier of dataspace to release. + * @param startblock + * first block to retrieve + * @param numblocks + * number of blocks to retrieve + * @param buf + * returns blocks startblock to startblock+num-1, each block is rank * 2 (corners) longs. + * + * @return a non-negative value if successful * * @exception HDF5LibraryException * - Error from the HDF-5 Library. + * @exception NullPointerException + * - buf is null. **/ - public synchronized static native boolean H5Sis_regular_hyperslab(long space_id) throws HDF5LibraryException; + public synchronized static native int H5Sget_select_hyper_blocklist(long spaceid, long startblock, long numblocks, + long[] buf) throws HDF5LibraryException, NullPointerException; - // /////// unimplemented //////// - // #ifdef NEW_HYPERSLAB_API - // hid_t H5Scombine_hyperslab(hid_t space_id, H5S_seloper_t op, - // const hsize_t start[], - // const hsize_t _stride[], - // const hsize_t count[], - // const hsize_t _block[]); - // herr_t H5Sselect_select(hid_t space1_id, H5S_seloper_t op, - // hid_t space2_id); - // hid_t H5Scombine_select(hid_t space1_id, H5S_seloper_t op, - // hid_t space2_id); - // #endif /* NEW_HYPERSLAB_API */ - // herr_t H5Sselect_copy(hid_t dst_id, hid_t src_id); + /** + * H5Sselect_project_intersection projects the intersection of the selections of src_space_id and + * src_intersect_space_id within the selection of src_space_id as a + * selection within the selection of dst_space_id. + * + * @param src_space_id + * Selection that is mapped to dst_space_id, and intersected with src_intersect_space_id + * @param dst_space_id + * Selection that is mapped to src_space_id + * @param src_intersect_space_id + * Selection whose intersection with src_space_id is projected to dst_space_id to obtain the result + * + * @return a dataspace with a selection equal to the intersection of + * src_intersect_space_id and src_space_id projected from src_space to dst_space on success + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native long H5Sselect_project_intersection(long src_space_id, long dst_space_id, + long src_intersect_space_id) throws HDF5LibraryException; + + + // /////// unimplemented //////// + ///// Operations on dataspace selections ///// + + // + ///// Operations on dataspace selection iterators ///// + //public synchronized static native H5Ssel_iter_create(hid_t spaceid, size_t elmt_size, unsigned flags); + //public synchronized static native H5Ssel_iter_get_seq_list(hid_t sel_iter_id, size_t maxseq, size_t maxbytes, size_t *nseq, + // size_t *nbytes, hsize_t *off, size_t *len); + //public synchronized static native H5Ssel_iter_reset(hid_t sel_iter_id, hid_t space_id); + //public synchronized static native H5Ssel_iter_close(hid_t sel_iter_id); @@ -9737,6 +12170,23 @@ public class H5 implements java.io.Serializable { return H5Tenum_insert_int(type, name, value); } + /** + * H5Tenum_insert inserts a new enumeration datatype member into an enumeration datatype. + * + * @param type + * IN: Identifier of datatype. + * @param name + * IN: The name of the member + * @param value + * IN: The value of the member, data of the correct type + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - name is null. + **/ public static int H5Tenum_insert(long type, String name, int value) throws HDF5LibraryException, NullPointerException { int[] val = { value }; @@ -10893,15 +13343,128 @@ public class H5 implements java.io.Serializable { // //////////////////////////////////////////////////////////// /// VOL Connector Functionality + /** + * H5VLregister_connector_by_name registers a new VOL connector as a member of the virtual object layer class. + * + * @param connector_name + * IN: name of the connector. + * @param vipl_id + * IN: VOL initialization property list which must be + * created with H5Pcreate(H5P_VOL_INITIALIZE) (or H5P_DEFAULT). + * + * @return a VOL connector ID + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ public synchronized static native long H5VLregister_connector_by_name(String connector_name, long vipl_id); + /** + * H5VLregister_connector_by_value registers a new VOL connector as a member of the virtual object layer class. + * + * @param connector_value + * IN: value of the connector. + * @param vipl_id + * IN: VOL initialization property list which must be + * created with H5Pcreate(H5P_VOL_INITIALIZE) (or H5P_DEFAULT). + * + * @return a VOL connector ID + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ public synchronized static native long H5VLregister_connector_by_value(int connector_value, long vipl_id); + /** + * H5VLis_connector_registered_by_name tests whether a VOL class has been registered. + * + * @param name + * IN: name of the connector. + * + * @return true if a VOL connector with that name has been registered + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ public synchronized static native boolean H5VLis_connector_registered_by_name(String name); + /** + * H5VLis_connector_registered_by_value tests whether a VOL class has been registered. + * + * @param connector_value + * IN: value of the connector. + * + * @return true if a VOL connector with that value has been registered + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ public synchronized static native boolean H5VLis_connector_registered_by_value(int connector_value); + /** + * H5VLget_connector_id retrieves the ID for a registered VOL connector for a given object. + * + * @param object_id + * IN: Identifier of the object. + * + * @return a VOL connector ID + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ public synchronized static native long H5VLget_connector_id(long object_id); + /** + * H5VLget_connector_id_by_name retrieves the ID for a registered VOL connector. + * + * @param name + * IN: name of the connector. + * + * @return a VOL connector ID + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ public synchronized static native long H5VLget_connector_id_by_name(String name); + /** + * H5VLget_connector_id_by_value retrieves the ID for a registered VOL connector. + * + * @param connector_value + * IN: value of the connector. + * + * @return a VOL connector ID + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ public synchronized static native long H5VLget_connector_id_by_value(int connector_value); + /** + * H5VLget_connector_name returns the connector name for the VOL associated with the + * object or file ID. + * + * @param object_id + * IN: Identifier of the object. + * + * @return the connector name + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ public synchronized static native String H5VLget_connector_name(long object_id); + /** + * H5VLclose closes a VOL connector ID. + * + * @param connector_id + * IN: Identifier of the connector. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ public synchronized static native void H5VLclose(long connector_id); + /** + * H5VLunregister_connector removes a VOL connector ID from the library. + * + * @param connector_id + * IN: Identifier of the connector. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ public synchronized static native void H5VLunregister_connector(long connector_id); // /////// unimplemented //////// @@ -10914,11 +13477,44 @@ public class H5 implements java.io.Serializable { // // // //////////////////////////////////////////////////////////// - public synchronized static native int H5Zfilter_avail(int filter) throws HDF5LibraryException, NullPointerException; + /** + * H5Zfilter_avail checks if a filter is available. + * + * @param filter + * IN: filter number. + * + * @return a non-negative(TRUE/FALSE) value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native int H5Zfilter_avail(int filter) throws HDF5LibraryException; + /** + * H5Zget_filter_info gets information about a pipeline data filter. + * + * @param filter + * IN: filter number. + * + * @return the filter information flags + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ public synchronized static native int H5Zget_filter_info(int filter) throws HDF5LibraryException; - public synchronized static native int H5Zunregister(int filter) throws HDF5LibraryException, NullPointerException; + /** + * H5Zunregister unregisters a filter. + * + * @param filter + * IN: filter number. + * + * @return a non-negative value if successful + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native int H5Zunregister(int filter) throws HDF5LibraryException; // /////// unimplemented //////// diff --git a/java/src/hdf/hdf5lib/HDF5Constants.java b/java/src/hdf/hdf5lib/HDF5Constants.java index b390183..2241238 100644 --- a/java/src/hdf/hdf5lib/HDF5Constants.java +++ b/java/src/hdf/hdf5lib/HDF5Constants.java @@ -35,12 +35,17 @@ public class HDF5Constants { // Get the HDF5 constants from the library // // ///////////////////////////////////////////////////////////////////////// - public static final long H5_QUARTER_HADDR_MAX = H5_QUARTER_HADDR_MAX(); + //public static final long H5_QUARTER_HADDR_MAX = H5_QUARTER_HADDR_MAX(); + /** 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(); public static final int H5_INDEX_UNKNOWN = H5_INDEX_UNKNOWN(); public static final int H5_INDEX_NAME = H5_INDEX_NAME(); @@ -92,110 +97,359 @@ public class HDF5Constants { 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 atom */ public static final long H5E_ATOM = H5E_ATOM(); + /** Major error codes - Attribute */ public static final long H5E_ATTR = H5E_ATTR(); + /** Minor error codes - Object atom related errors - Unable to find atom information (already closed?) */ public static final long H5E_BADATOM = H5E_BADATOM(); + /** Minor error codes - File accessibility errors - Bad file ID accessed */ public static final long H5E_BADFILE = H5E_BADFILE(); + /** Minor error codes - Object atom 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(); - // public static final long H5E_CANTALLOC = H5E_CANTALLOC(); + /** 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 atom 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 atom 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(); - // public static final long H5E_CANTRECV = H5E_CANTRECV(); + /** 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 atom related errors - Unable to register new atom */ 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 atom 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(); @@ -423,29 +677,53 @@ public class HDF5Constants { 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(); @@ -664,48 +942,96 @@ public class HDF5Constants { 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(); - public static final int H5Z_FILTER_ALL = H5Z_FILTER_ALL(); // ///////////////////////////////////////////////////////////////////////// // List of private native variables to get constant values from C // @@ -840,6 +1166,8 @@ public class HDF5Constants { 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(); @@ -860,15 +1188,30 @@ public class HDF5Constants { private static native final long H5E_CANAPPLY(); - // private static native final long H5E_CANTALLOC(); + 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(); @@ -881,18 +1224,36 @@ public class HDF5Constants { 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(); @@ -901,29 +1262,96 @@ public class HDF5Constants { 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_CANTRECV(); + 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(); @@ -934,10 +1362,16 @@ public class HDF5Constants { 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(); @@ -946,10 +1380,14 @@ public class HDF5Constants { 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(); @@ -958,8 +1396,12 @@ public class HDF5Constants { 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(); @@ -968,6 +1410,12 @@ public class HDF5Constants { 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(); @@ -984,14 +1432,26 @@ public class HDF5Constants { 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(); @@ -1004,12 +1464,24 @@ public class HDF5Constants { 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(); diff --git a/java/src/hdf/hdf5lib/callbacks/H5A_iterate_cb.java b/java/src/hdf/hdf5lib/callbacks/H5A_iterate_cb.java index 988c8fb..69c9709 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5A_iterate_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5A_iterate_cb.java @@ -15,7 +15,28 @@ package hdf.hdf5lib.callbacks; import hdf.hdf5lib.structs.H5A_info_t; -//Information class for link callback(for H5Aiterate) +/** + * Information class for link callback for H5Aiterate. + * + */ public interface H5A_iterate_cb extends Callbacks { - int callback(long group, String name, H5A_info_t info, H5A_iterate_t op_data); + /** + * 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); } diff --git a/java/src/hdf/hdf5lib/callbacks/H5A_iterate_t.java b/java/src/hdf/hdf5lib/callbacks/H5A_iterate_t.java index 51d67d5..bdc96fa 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5A_iterate_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5A_iterate_t.java @@ -13,6 +13,10 @@ 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. diff --git a/java/src/hdf/hdf5lib/callbacks/H5D_append_cb.java b/java/src/hdf/hdf5lib/callbacks/H5D_append_cb.java index ead8f73..8ad336f 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5D_append_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5D_append_cb.java @@ -13,7 +13,27 @@ package hdf.hdf5lib.callbacks; -//Information class for link callback(for H5Pset/get_append_flush) +/** + * Information class for link callback for H5Pset/get_append_flush. + * + */ public interface H5D_append_cb extends Callbacks { + /** + * 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); } diff --git a/java/src/hdf/hdf5lib/callbacks/H5D_append_t.java b/java/src/hdf/hdf5lib/callbacks/H5D_append_t.java index 8bf6410..795ed1e 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5D_append_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5D_append_t.java @@ -13,6 +13,10 @@ 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. diff --git a/java/src/hdf/hdf5lib/callbacks/H5D_iterate_cb.java b/java/src/hdf/hdf5lib/callbacks/H5D_iterate_cb.java index a911a1c..ca10342 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5D_iterate_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5D_iterate_cb.java @@ -13,7 +13,29 @@ package hdf.hdf5lib.callbacks; -//Information class for link callback(for H5Diterate) +/** + * Information class for link callback for H5Diterate. + * + */ public interface H5D_iterate_cb extends Callbacks { + /** + * 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); } diff --git a/java/src/hdf/hdf5lib/callbacks/H5D_iterate_t.java b/java/src/hdf/hdf5lib/callbacks/H5D_iterate_t.java index d049711..43fc159 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5D_iterate_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5D_iterate_t.java @@ -13,6 +13,10 @@ 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. diff --git a/java/src/hdf/hdf5lib/callbacks/H5E_walk_cb.java b/java/src/hdf/hdf5lib/callbacks/H5E_walk_cb.java index afc04ae..e5914c1 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5E_walk_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5E_walk_cb.java @@ -15,7 +15,27 @@ package hdf.hdf5lib.callbacks; import hdf.hdf5lib.structs.H5E_error2_t; -//Information class for link callback(for H5Ewalk) +/** + * Information class for link callback for H5Ewalk. + * + */ public interface H5E_walk_cb extends Callbacks { + /** + * 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); } diff --git a/java/src/hdf/hdf5lib/callbacks/H5E_walk_t.java b/java/src/hdf/hdf5lib/callbacks/H5E_walk_t.java index 0be8977..3ff09ec 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5E_walk_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5E_walk_t.java @@ -13,6 +13,10 @@ 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. diff --git a/java/src/hdf/hdf5lib/callbacks/H5L_iterate_opdata_t.java b/java/src/hdf/hdf5lib/callbacks/H5L_iterate_opdata_t.java index ad9ad8c..ad28b04 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5L_iterate_opdata_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5L_iterate_opdata_t.java @@ -13,6 +13,10 @@ package hdf.hdf5lib.callbacks; +/** + * Data class for link callback for H5Lvisit/H5Lvisit_by_name. + * + */ public interface H5L_iterate_opdata_t { } diff --git a/java/src/hdf/hdf5lib/callbacks/H5L_iterate_t.java b/java/src/hdf/hdf5lib/callbacks/H5L_iterate_t.java index f92fbc4..d08001a 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5L_iterate_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5L_iterate_t.java @@ -15,7 +15,28 @@ package hdf.hdf5lib.callbacks; import hdf.hdf5lib.structs.H5L_info_t; -// Information class for link callback (for H5Lvisit/H5Lvisit_by_name). +/** + * Information class for link callback for H5Lvisit/H5Lvisit_by_name. + * + */ public interface H5L_iterate_t extends Callbacks { - int callback(long group, String name, H5L_info_t info, H5L_iterate_opdata_t op_data); + /** + * 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); } diff --git a/java/src/hdf/hdf5lib/callbacks/H5O_iterate_opdata_t.java b/java/src/hdf/hdf5lib/callbacks/H5O_iterate_opdata_t.java index e1c47b5..15eb1a1 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5O_iterate_opdata_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5O_iterate_opdata_t.java @@ -13,6 +13,10 @@ package hdf.hdf5lib.callbacks; +/** + * Data class for link callback for H5Ovisit/H5Ovisit_by_name. + * + */ public interface H5O_iterate_opdata_t { } diff --git a/java/src/hdf/hdf5lib/callbacks/H5O_iterate_t.java b/java/src/hdf/hdf5lib/callbacks/H5O_iterate_t.java index 9a55106..e627775 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5O_iterate_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5O_iterate_t.java @@ -15,7 +15,28 @@ package hdf.hdf5lib.callbacks; import hdf.hdf5lib.structs.H5O_info_t; -// Information class for link callback(for H5Ovisit/H5Ovisit_by_name) +/** + * Information class for link callback for H5Ovisit/H5Ovisit_by_name. + * + */ public interface H5O_iterate_t extends Callbacks { - int callback(long group, String name, H5O_info_t info, H5O_iterate_opdata_t op_data); + /** + * 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); } diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_cb.java index e77d386..78a87ad 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_cb.java @@ -13,7 +13,26 @@ package hdf.hdf5lib.callbacks; -//Information class for link callback(for H5Pcreate_class) +/** + * Information class for link callback for H5Pcreate_class. + * + */ public interface H5P_cls_close_func_cb extends Callbacks { + /** + * 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); } diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_t.java b/java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_t.java index 0d5ad9e..709ee494 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_t.java @@ -13,6 +13,10 @@ 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. diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_cb.java index 139f877..878bbd3 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_cb.java @@ -13,7 +13,27 @@ package hdf.hdf5lib.callbacks; -//Information class for link callback(for H5Pcreate_class) +/** + * Information class for link callback for H5Pcreate_class + * + */ public interface H5P_cls_copy_func_cb extends Callbacks { + /** + * 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); } diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_t.java b/java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_t.java index 12c2601..b3e7f09 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_t.java @@ -13,6 +13,10 @@ 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. diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_cb.java index e64ec6f..88d0aa6 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_cb.java @@ -13,7 +13,26 @@ package hdf.hdf5lib.callbacks; -//Information class for link callback(for H5Pcreate_class) +/** + * Information class for link callback for H5Pcreate_class. + * + */ public interface H5P_cls_create_func_cb extends Callbacks { + /** + * 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); } diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_t.java b/java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_t.java index 73646f1..8e259cc 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_t.java @@ -13,6 +13,10 @@ 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. diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_iterate_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_iterate_cb.java index 5ecb88d..60e1884 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_iterate_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_iterate_cb.java @@ -13,7 +13,27 @@ package hdf.hdf5lib.callbacks; -//Information class for link callback(for H5Piterate) +/** + * Information class for link callback for H5Piterate. + * + */ public interface H5P_iterate_cb extends Callbacks { + /** + * 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); } diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_iterate_t.java b/java/src/hdf/hdf5lib/callbacks/H5P_iterate_t.java index 2e320b4..4c5d222 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_iterate_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_iterate_t.java @@ -13,6 +13,10 @@ 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. diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_prp_close_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_prp_close_func_cb.java index 103fe5f..40569bc 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_prp_close_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_prp_close_func_cb.java @@ -13,7 +13,27 @@ package hdf.hdf5lib.callbacks; -//Information class for link callback(for H5Pregister2) +/** + * Information class for link callback for H5Pregister2. + * + */ public interface H5P_prp_close_func_cb extends Callbacks { + /** + * 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); } diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_prp_compare_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_prp_compare_func_cb.java index 46477b9..cc466a6 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_prp_compare_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_prp_compare_func_cb.java @@ -13,7 +13,27 @@ package hdf.hdf5lib.callbacks; -//Information class for link callback(for H5Pregister2) +/** + * Information class for link callback for H5Pregister2. + * + */ public interface H5P_prp_compare_func_cb extends Callbacks { + /** + * 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); } diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_prp_copy_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_prp_copy_func_cb.java index 57994bb5..59e4bb8 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_prp_copy_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_prp_copy_func_cb.java @@ -13,7 +13,27 @@ package hdf.hdf5lib.callbacks; -//Information class for link callback(for H5Pregister2) +/** + * Information class for link callback for H5Pregister2. + * + */ public interface H5P_prp_copy_func_cb extends Callbacks { + /** + * 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); } diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_prp_create_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_prp_create_func_cb.java index 8791c22..5c6df7a 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_prp_create_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_prp_create_func_cb.java @@ -13,7 +13,27 @@ package hdf.hdf5lib.callbacks; -//Information class for link callback(for H5Pregister2) +/** + * Information class for link callback for H5Pregister2. + * + */ public interface H5P_prp_create_func_cb extends Callbacks { + /** + * 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); } diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_prp_delete_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_prp_delete_func_cb.java index 46cd097..5206d4f 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_prp_delete_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_prp_delete_func_cb.java @@ -13,7 +13,28 @@ package hdf.hdf5lib.callbacks; -//Information class for link callback(for H5Pregister2) +/** + * Information class for link callback for H5Pregister2. + * + */ public interface H5P_prp_delete_func_cb extends Callbacks { + /** + * 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); } diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_prp_get_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_prp_get_func_cb.java index 04599a0..8f44497 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_prp_get_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_prp_get_func_cb.java @@ -13,7 +13,28 @@ package hdf.hdf5lib.callbacks; -//Information class for link callback(for H5Pregister2) +/** + * Information class for link callback for H5Pregister2. + * + */ public interface H5P_prp_get_func_cb extends Callbacks { + /** + * 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); } diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_prp_set_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_prp_set_func_cb.java index 6ac750f..2a2d3a1 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_prp_set_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_prp_set_func_cb.java @@ -13,7 +13,28 @@ package hdf.hdf5lib.callbacks; -//Information class for link callback(for H5Pregister2) +/** + * Information class for link callback for H5Pregister2. + * + */ public interface H5P_prp_set_func_cb extends Callbacks { + /** + * 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); } diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5Exception.java b/java/src/hdf/hdf5lib/exceptions/HDF5Exception.java index 1e4b5fd..70fdd11 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5Exception.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5Exception.java @@ -31,6 +31,9 @@ package hdf.hdf5lib.exceptions; * */ public class HDF5Exception extends RuntimeException { + /** + * the specified detail message of this exception + */ protected String detailMessage; /** diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5ReferenceException.java b/java/src/hdf/hdf5lib/exceptions/HDF5ReferenceException.java index ea4a89a..fea5b6d 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5ReferenceException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5ReferenceException.java @@ -13,6 +13,12 @@ package hdf.hdf5lib.exceptions; +/** + * The class HDF5LibraryException returns errors raised by the HDF5 library. + *

+ * This sub-class represents HDF-5 major error code H5E_REFERENCE + */ + public class HDF5ReferenceException extends HDF5LibraryException { /** * Constructs an HDF5ReferenceException with no specified diff --git a/java/src/hdf/hdf5lib/structs/H5AC_cache_config_t.java b/java/src/hdf/hdf5lib/structs/H5AC_cache_config_t.java index 20863dc..a118d05 100644 --- a/java/src/hdf/hdf5lib/structs/H5AC_cache_config_t.java +++ b/java/src/hdf/hdf5lib/structs/H5AC_cache_config_t.java @@ -15,7 +15,10 @@ package hdf.hdf5lib.structs; import java.io.Serializable; -//Information struct for H5Pget_mdc_config/H5Pset_mdc_config +/** + * 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: diff --git a/java/src/hdf/hdf5lib/structs/H5A_info_t.java b/java/src/hdf/hdf5lib/structs/H5A_info_t.java index a46a495..cd7a397 100644 --- a/java/src/hdf/hdf5lib/structs/H5A_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5A_info_t.java @@ -15,7 +15,10 @@ package hdf.hdf5lib.structs; import java.io.Serializable; -//Information struct for Attribute (For H5Aget_info/H5Aget_info_by_idx/H5Aget_info_by_name) +/** + * 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; public boolean corder_valid; // Indicate if creation order is valid diff --git a/java/src/hdf/hdf5lib/structs/H5E_error2_t.java b/java/src/hdf/hdf5lib/structs/H5E_error2_t.java index 257ad05..083537f 100644 --- a/java/src/hdf/hdf5lib/structs/H5E_error2_t.java +++ b/java/src/hdf/hdf5lib/structs/H5E_error2_t.java @@ -15,7 +15,10 @@ package hdf.hdf5lib.structs; import java.io.Serializable; -//Information struct for Attribute (For H5Ewalk) +/** + * Information struct for Attribute (For H5Ewalk) + * + */ public class H5E_error2_t implements Serializable{ private static final long serialVersionUID = 279144359041667613L; diff --git a/java/src/hdf/hdf5lib/structs/H5FD_hdfs_fapl_t.java b/java/src/hdf/hdf5lib/structs/H5FD_hdfs_fapl_t.java index 9fcff2e..26690ec 100644 --- a/java/src/hdf/hdf5lib/structs/H5FD_hdfs_fapl_t.java +++ b/java/src/hdf/hdf5lib/structs/H5FD_hdfs_fapl_t.java @@ -16,7 +16,7 @@ package hdf.hdf5lib.structs; import java.io.Serializable; -/* +/** * Java representation of the HDFS VFD file access property list (fapl) * structure. * diff --git a/java/src/hdf/hdf5lib/structs/H5FD_ros3_fapl_t.java b/java/src/hdf/hdf5lib/structs/H5FD_ros3_fapl_t.java index a899e10..735cc7e 100644 --- a/java/src/hdf/hdf5lib/structs/H5FD_ros3_fapl_t.java +++ b/java/src/hdf/hdf5lib/structs/H5FD_ros3_fapl_t.java @@ -16,7 +16,7 @@ package hdf.hdf5lib.structs; import java.io.Serializable; -/* +/** * Java representation of the ROS3 VFD file access property list (fapl) * structure. * diff --git a/java/src/hdf/hdf5lib/structs/H5F_info2_t.java b/java/src/hdf/hdf5lib/structs/H5F_info2_t.java index 4664b5b..836b683 100644 --- a/java/src/hdf/hdf5lib/structs/H5F_info2_t.java +++ b/java/src/hdf/hdf5lib/structs/H5F_info2_t.java @@ -15,7 +15,10 @@ package hdf.hdf5lib.structs; import java.io.Serializable; -//Information struct for object (for H5Fget_info) +/** + * Information struct for object (for H5Fget_info) + * + */ public class H5F_info2_t implements Serializable{ private static final long serialVersionUID = 4691681162544054518L; public int super_version; // Superblock version # diff --git a/java/src/hdf/hdf5lib/structs/H5G_info_t.java b/java/src/hdf/hdf5lib/structs/H5G_info_t.java index 56c876e..9a5c72e 100644 --- a/java/src/hdf/hdf5lib/structs/H5G_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5G_info_t.java @@ -15,7 +15,10 @@ package hdf.hdf5lib.structs; import java.io.Serializable; -//Information struct for group (for H5Gget_info/H5Gget_info_by_name/H5Gget_info_by_idx) +/** + * 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; public int storage_type; // Type of storage for links in group diff --git a/java/src/hdf/hdf5lib/structs/H5L_info_t.java b/java/src/hdf/hdf5lib/structs/H5L_info_t.java index 377e617..16d9bbf 100644 --- a/java/src/hdf/hdf5lib/structs/H5L_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5L_info_t.java @@ -17,7 +17,10 @@ import java.io.Serializable; import hdf.hdf5lib.HDF5Constants; -// Information struct for link (for H5Lget_info/H5Lget_info_by_idx) +/** + * Information struct for link (for H5Lget_info/H5Lget_info_by_idx) + * + */ public class H5L_info_t implements Serializable { private static final long serialVersionUID = -4754320605310155033L; public int type; diff --git a/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java b/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java index 73aaa47..df76638 100644 --- a/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java @@ -15,7 +15,10 @@ 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) +/** + * 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; public int version; /* Version number of header format in file */ @@ -56,25 +59,25 @@ public class H5O_hdr_info_t implements Serializable { H5O_hdr_info_t info = (H5O_hdr_info_t) o; if (this.version != info.version) - return false; + return false; if (this.nmesgs != info.nmesgs) - return false; + return false; if (this.nchunks != info.nchunks) - return false; + return false; if (this.flags != info.flags) - return false; + return false; if (this.space_total != info.space_total) - return false; + return false; if (this.space_meta != info.space_meta) - return false; + return false; if (this.space_mesg != info.space_mesg) - return false; + return false; if (this.space_free != info.space_free) - return false; + return false; if (this.mesg_present != info.mesg_present) - return false; + return false; if (this.mesg_shared != info.mesg_shared) - return false; + return false; return true; } diff --git a/java/src/hdf/hdf5lib/structs/H5O_info_t.java b/java/src/hdf/hdf5lib/structs/H5O_info_t.java index 6a26a10..2f76384 100644 --- a/java/src/hdf/hdf5lib/structs/H5O_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5O_info_t.java @@ -15,7 +15,10 @@ package hdf.hdf5lib.structs; import java.io.Serializable; -// Information struct for object (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx) +/** + * 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; public long fileno; /* File number that object is located in */ diff --git a/java/src/hdf/hdf5lib/structs/H5O_native_info_t.java b/java/src/hdf/hdf5lib/structs/H5O_native_info_t.java index f410a7f..89a5c5f 100644 --- a/java/src/hdf/hdf5lib/structs/H5O_native_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5O_native_info_t.java @@ -15,7 +15,10 @@ 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). +/** + * 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; @@ -45,7 +48,7 @@ public class H5O_native_info_t implements Serializable { 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 false; return true; } diff --git a/java/src/hdf/hdf5lib/structs/H5O_token_t.java b/java/src/hdf/hdf5lib/structs/H5O_token_t.java index e6d2474..be934e4 100644 --- a/java/src/hdf/hdf5lib/structs/H5O_token_t.java +++ b/java/src/hdf/hdf5lib/structs/H5O_token_t.java @@ -17,7 +17,10 @@ import java.util.Arrays; import hdf.hdf5lib.HDF5Constants; -// Object token, which is a unique and permanent identifier, for an HDF5 object within a container. +/** + * 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; public byte[] data; diff --git a/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java b/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java index 7159f02..1c3ab80 100644 --- a/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java @@ -15,7 +15,10 @@ package hdf.hdf5lib.structs; import java.io.Serializable; -//Information struct for group (for H5Gget_info/H5Gget_info_by_name/H5Gget_info_by_idx) +/** + * 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; public long index_size; /* btree and/or list */ @@ -38,9 +41,9 @@ public class H5_ih_info_t implements Serializable { H5_ih_info_t info = (H5_ih_info_t) o; if (this.index_size != info.index_size) - return false; + return false; if (this.heap_size != info.heap_size) - return false; + return false; return true; } diff --git a/java/src/jni/h5Constants.c b/java/src/jni/h5Constants.c index 66a3389..ade28e8 100644 --- a/java/src/jni/h5Constants.c +++ b/java/src/jni/h5Constants.c @@ -355,6 +355,11 @@ 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; @@ -404,8 +409,26 @@ 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_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) { @@ -417,6 +440,21 @@ 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; @@ -427,6 +465,11 @@ 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; @@ -457,11 +500,36 @@ 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; @@ -472,11 +540,26 @@ 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; @@ -487,6 +570,11 @@ 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; @@ -506,12 +594,59 @@ 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; @@ -521,8 +656,36 @@ Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTOPENOBJ(JNIEnv *env, jclass cls) { return H5E_CANTOPENOBJ; } -/*JNIEXPORT jlong JNICALL -Java_hdf_hdf5lib_HDF5Constants_H5E_1CANTRECV(JNIEnv *env, jclass cls) { return H5E_CANTRECV; }*/ +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) { @@ -534,6 +697,41 @@ 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; @@ -544,15 +742,72 @@ 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) { @@ -564,6 +819,11 @@ 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; @@ -589,16 +849,31 @@ 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; @@ -619,6 +894,11 @@ 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; @@ -629,6 +909,11 @@ 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; @@ -648,11 +933,21 @@ 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) { @@ -674,6 +969,21 @@ 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; @@ -714,16 +1024,41 @@ 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; @@ -734,6 +1069,11 @@ 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; @@ -764,11 +1104,26 @@ 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; @@ -779,6 +1134,21 @@ 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; diff --git a/java/src/jni/h5sImp.c b/java/src/jni/h5sImp.c index 2a9cff5..e29c2ec 100644 --- a/java/src/jni/h5sImp.c +++ b/java/src/jni/h5sImp.c @@ -1340,6 +1340,389 @@ done: return; } /* end Java_hdf_hdf5lib_H5_H5Sget_1regular_1hyperslab */ +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Sselect_copy + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5Sselect_1copy(JNIEnv *env, jclass clss, jlong dst_id, jlong src_id) +{ + hssize_t retVal = -1; + + UNUSED(clss); + + if ((retVal = H5Sselect_copy((hid_t)dst_id, (hid_t)src_id)) < 0) + H5_LIBRARY_ERROR(ENVONLY); + +done: + return; +} /* end Java_hdf_hdf5lib_H5_H5Sselect_1copy */ + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Sselect_shape_same + * Signature: (JJ)Z + */ +JNIEXPORT jboolean JNICALL +Java_hdf_hdf5lib_H5_H5Sselect_1shape_1same(JNIEnv *env, jclass clss, jlong space1_id, jlong space2_id) +{ + htri_t bval = JNI_FALSE; + + UNUSED(clss); + + if ((bval = H5Sselect_shape_same((hid_t)space1_id, (hid_t)space2_id)) < 0) + H5_LIBRARY_ERROR(ENVONLY); + + bval = (bval > 0) ? JNI_TRUE : JNI_FALSE; + +done: + return (jboolean)bval; +} /* end Java_hdf_hdf5lib_H5_H5Sselect_1shape_1same */ + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Sselect_adjust + * Signature: (J[J)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5Sselect_1adjust(JNIEnv *env, jclass clss, jlong space_id, jlongArray offset) +{ + jboolean isCopy; + hssize_t *offst = NULL; + jlong * offsetP = NULL; + jsize offset_rank = -1; + int i, rank = -1; + herr_t status = FAIL; + + UNUSED(clss); + + if (space_id < 0) + H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Sselect_adjust: invalid dataspace ID"); + + if ((rank = H5Sget_simple_extent_ndims(space_id)) < 0) + H5_LIBRARY_ERROR(ENVONLY); + + if (NULL == offset) { + offsetP = NULL; + offst = (hssize_t *)offsetP; + } + else { + if ((offset_rank = ENVPTR->GetArrayLength(ENVONLY, offset)) < 0) { + CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); + H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Sselect_adjust: offset length < 0"); + } + + if (offset_rank != rank) + H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Sselect_adjust: offset rank doesn't match dataspace rank!"); + + PIN_LONG_ARRAY(ENVONLY, offset, offsetP, &isCopy, "H5Sselect_adjust: offset not pinned"); + + if (NULL == (offst = (hssize_t *)HDmalloc((size_t)offset_rank * sizeof(hsize_t)))) + H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Sselect_adjust: failed to allocate offset buffer"); + } + + if ((status = H5Sselect_adjust(space_id, (hssize_t *)offst)) < 0) + H5_LIBRARY_ERROR(ENVONLY); + + for (i = 0; i < offset_rank; i++) { + offsetP[i] = (jlong)offst[i]; + } /* end for */ + +done: + if (offst) + HDfree(offst); + if (offsetP) + UNPIN_LONG_ARRAY(ENVONLY, offset, offsetP, (status < 0) ? JNI_ABORT : 0); + + return; +} /* end Java_hdf_hdf5lib_H5_H5Sselect_1adjust */ + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Sselect_intersect_block + * Signature: (J[J[J)Z + */ +JNIEXPORT jboolean JNICALL +Java_hdf_hdf5lib_H5_H5Sselect_1intersect_1block(JNIEnv *env, jclass clss, jlong space_id, jlongArray start, + jlongArray end) +{ + htri_t bval = JNI_FALSE; + jboolean isCopy; + hsize_t *strt = NULL, *nd = NULL; + jlong * startP = NULL, *endP = NULL; + jsize start_rank = -1, end_rank = -1; + int i, rank = -1; + + UNUSED(clss); + + if (space_id < 0) + H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Sselect_intersect_block: invalid dataspace ID"); + + if ((rank = H5Sget_simple_extent_ndims(space_id)) < 0) + H5_LIBRARY_ERROR(ENVONLY); + + if (NULL == start) { + startP = NULL; + strt = (hsize_t *)startP; + } + else { + if ((start_rank = ENVPTR->GetArrayLength(ENVONLY, start)) < 0) { + CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); + H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Sselect_intersect_block: start length < 0"); + } + + if (start_rank != rank) + H5_BAD_ARGUMENT_ERROR(ENVONLY, + "H5Sselect_intersect_block: start rank doesn't match dataspace rank!"); + + PIN_LONG_ARRAY(ENVONLY, start, startP, &isCopy, "H5Sselect_intersect_block: start not pinned"); + + if (NULL == (strt = (hsize_t *)HDmalloc((size_t)start_rank * sizeof(hsize_t)))) + H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Sselect_intersect_block: failed to allocate start buffer"); + } + + if (NULL == end) { + endP = NULL; + nd = (hsize_t *)endP; + } + else { + if ((end_rank = ENVPTR->GetArrayLength(ENVONLY, end)) < 0) { + CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); + H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Sselect_intersect_block: end array length < 0"); + } + + if (end_rank != rank) + H5_BAD_ARGUMENT_ERROR(ENVONLY, + "H5Sselect_intersect_block: end rank doesn't match dataspace rank!"); + + PIN_LONG_ARRAY(ENVONLY, end, endP, &isCopy, "H5Sselect_intersect_block: end not pinned"); + + if (NULL == (nd = (hsize_t *)HDmalloc((size_t)end_rank * sizeof(hsize_t)))) + H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Sselect_intersect_block: failed to allocate end buffer"); + } + + if ((bval = H5Sselect_intersect_block(space_id, (hsize_t *)strt, (hsize_t *)nd)) < 0) + H5_LIBRARY_ERROR(ENVONLY); + + bval = (bval > 0) ? JNI_TRUE : JNI_FALSE; + + for (i = 0; i < start_rank; i++) { + startP[i] = (jlong)strt[i]; + endP[i] = (jlong)nd[i]; + } /* end for */ + +done: + if (strt) + HDfree(strt); + if (startP) + UNPIN_LONG_ARRAY(ENVONLY, start, startP, (bval < 0) ? JNI_ABORT : 0); + if (nd) + HDfree(nd); + if (endP) + UNPIN_LONG_ARRAY(ENVONLY, end, endP, (bval < 0) ? JNI_ABORT : 0); + + return (jboolean)bval; +} /* end Java_hdf_hdf5lib_H5_H5Sselect_1intersect_1block */ + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Sselect_project_intersection + * Signature: (JJJ)J + */ +JNIEXPORT jlong JNICALL +Java_hdf_hdf5lib_H5_H5Sselect_1project_1intersection(JNIEnv *env, jclass clss, jlong src_space_id, + jlong dst_space_id, jlong src_intersect_space_id) +{ + hid_t sid = H5I_INVALID_HID; + + UNUSED(clss); + + if ((sid = H5Sselect_project_intersection(src_space_id, dst_space_id, src_intersect_space_id)) < 0) + H5_LIBRARY_ERROR(ENVONLY); + +done: + + return (jlong)sid; +} /* end Java_hdf_hdf5lib_H5_H5Sselect_1project_1intersection */ + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Scombine_hyperslab + * Signature: (JI[J[J[J[J)J + */ +JNIEXPORT jlong JNICALL +Java_hdf_hdf5lib_H5_H5Scombine_1hyperslab(JNIEnv *env, jclass clss, jlong space_id, jint op, jlongArray start, + jlongArray stride, jlongArray count, jlongArray block) +{ + jboolean isCopy; + hsize_t *strt = NULL, *strd = NULL, *cnt = NULL, *blk = NULL; + hsize_t *lp = NULL; + jlong * startP = NULL, *strideP = NULL, *countP = NULL, *blockP = NULL; + jlong * jlp = NULL; + jsize start_rank, stride_rank, count_rank, block_rank; + int i; + hid_t sid = H5I_INVALID_HID; + + UNUSED(clss); + + if (NULL == start) + H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Sselect_hyperslab: start is NULL"); + if (NULL == count) + H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Sselect_hyperslab: count is NULL"); + + if ((start_rank = ENVPTR->GetArrayLength(ENVONLY, start)) < 0) { + CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); + H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Sselect_hyperslab: start array length < 0"); + } + if ((count_rank = ENVPTR->GetArrayLength(ENVONLY, count)) < 0) { + CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); + H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Sselect_hyperslab: count array length < 0"); + } + + if (start_rank != count_rank) + H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Sselect_hyperslab: count and start have different rank!"); + + PIN_LONG_ARRAY(ENVONLY, start, startP, &isCopy, "H5Sselect_hyperslab: start not pinned"); + + if (NULL == (strt = lp = (hsize_t *)HDmalloc((size_t)start_rank * sizeof(hsize_t)))) + H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Sselect_hyperslab: failed to allocate start buffer"); + + jlp = (jlong *)startP; + for (i = 0; i < start_rank; i++) { + *lp = (hsize_t)*jlp; + lp++; + jlp++; + } /* end if */ + + PIN_LONG_ARRAY(ENVONLY, count, countP, &isCopy, "H5Sselect_hyperslab: count not pinned"); + + if (NULL == (cnt = lp = (hsize_t *)HDmalloc((size_t)count_rank * sizeof(hsize_t)))) + H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Sselect_hyperslab: failed to allocate count buffer"); + + jlp = (jlong *)countP; + for (i = 0; i < count_rank; i++) { + *lp = (hsize_t)*jlp; + lp++; + jlp++; + } /* end if */ + + if (NULL == stride) { + strideP = NULL; + strd = (hsize_t *)strideP; + } + else { + if ((stride_rank = ENVPTR->GetArrayLength(ENVONLY, stride)) < 0) { + CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); + H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Sselect_hyperslab: stride array length < 0"); + } + + if (stride_rank != start_rank) + H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Sselect_hyperslab: stride and start have different rank!"); + + PIN_LONG_ARRAY(ENVONLY, stride, strideP, &isCopy, "H5Sselect_hyperslab: stride not pinned"); + + if (NULL == (strd = lp = (hsize_t *)HDmalloc((size_t)stride_rank * sizeof(hsize_t)))) + H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Sselect_hyperslab: failed to allocate stride buffer"); + + jlp = (jlong *)strideP; + for (i = 0; i < stride_rank; i++) { + *lp = (hsize_t)*jlp; + lp++; + jlp++; + } /* end if */ + } + + if (NULL == block) { + blockP = NULL; + blk = (hsize_t *)blockP; + } + else { + if ((block_rank = ENVPTR->GetArrayLength(ENVONLY, block)) < 0) { + CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE); + H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Sselect_hyperslab: block array length < 0"); + } + + if (block_rank != start_rank) + H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Sselect_hyperslab: block and start have different rank!"); + + PIN_LONG_ARRAY(ENVONLY, block, blockP, &isCopy, "H5Sselect_hyperslab: block not pinned"); + + if (NULL == (blk = lp = (hsize_t *)HDmalloc((size_t)block_rank * sizeof(hsize_t)))) + H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Sselect_hyperslab: failed to allocate block buffer"); + + jlp = (jlong *)blockP; + for (i = 0; i < block_rank; i++) { + *lp = (hsize_t)*jlp; + lp++; + jlp++; + } /* end for */ + } + + if ((sid = H5Scombine_hyperslab(space_id, (H5S_seloper_t)op, (const hsize_t *)strt, (const hsize_t *)strd, + (const hsize_t *)cnt, (const hsize_t *)blk)) < 0) + H5_LIBRARY_ERROR(ENVONLY); + +done: + if (blk) + HDfree(blk); + if (blockP) + UNPIN_LONG_ARRAY(ENVONLY, block, blockP, JNI_ABORT); + if (strd) + HDfree(strd); + if (strideP) + UNPIN_LONG_ARRAY(ENVONLY, stride, strideP, JNI_ABORT); + if (cnt) + HDfree(cnt); + if (countP) + UNPIN_LONG_ARRAY(ENVONLY, count, countP, JNI_ABORT); + if (strt) + HDfree(strt); + if (startP) + UNPIN_LONG_ARRAY(ENVONLY, start, startP, JNI_ABORT); + + return (jlong)sid; +} /* end Java_hdf_hdf5lib_H5_H5Sselect_1hyperslab */ + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Smodify_select + * Signature: (JIJ)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5Smodify_1select(JNIEnv *env, jclass clss, jlong space1_id, jint op, jlong space2_id) +{ + hssize_t retVal = -1; + + UNUSED(clss); + + if ((retVal = H5Smodify_select((hid_t)space1_id, (H5S_seloper_t)op, (hid_t)space2_id)) < 0) + H5_LIBRARY_ERROR(ENVONLY); + +done: + return; +} /* end Java_hdf_hdf5lib_H5_H5Smodify_1select */ + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Scombine_select + * Signature: (JIJ)J + */ +JNIEXPORT jlong JNICALL +Java_hdf_hdf5lib_H5_H5Scombine_1select(JNIEnv *env, jclass clss, jlong space1_id, jint op, jlong space2_id) +{ + hid_t sid = H5I_INVALID_HID; + + UNUSED(clss); + + if ((sid = H5Scombine_select((hid_t)space1_id, (H5S_seloper_t)op, (hid_t)space2_id)) < 0) + H5_LIBRARY_ERROR(ENVONLY); + +done: + + return (jlong)sid; +} /* end Java_hdf_hdf5lib_H5_H5Scombine_1select */ + #ifdef __cplusplus } /* end extern "C" */ #endif /* __cplusplus */ diff --git a/java/src/jni/h5sImp.h b/java/src/jni/h5sImp.h index ee28b39..83255c1 100644 --- a/java/src/jni/h5sImp.h +++ b/java/src/jni/h5sImp.h @@ -259,6 +259,65 @@ JNIEXPORT jboolean JNICALL Java_hdf_hdf5lib_H5_H5Sis_1regular_1hyperslab(JNIEnv JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Sget_1regular_1hyperslab(JNIEnv *, jclass, jlong, jlongArray, jlongArray, jlongArray, jlongArray); +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Sselect_copy + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Sselect_1copy(JNIEnv *, jclass, jlong, jlong); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Sselect_shape_same + * Signature: (JJ)Z + */ +JNIEXPORT jboolean JNICALL Java_hdf_hdf5lib_H5_H5Sselect_1shape_1same(JNIEnv *, jclass, jlong, jlong); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Sselect_adjust + * Signature: (J[J)V + */ +JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Sselect_1adjust(JNIEnv *, jclass, jlong, jlongArray); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Sselect_intersect_block + * Signature: (J[J[J)Z + */ +JNIEXPORT jboolean JNICALL Java_hdf_hdf5lib_H5_H5Sselect_1intersect_1block(JNIEnv *, jclass, jlong, + jlongArray, jlongArray); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Sselect_project_intersection + * Signature: (JJJ)J + */ +JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Sselect_1project_1intersection(JNIEnv *, jclass, jlong, jlong, + jlong); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Scombine_hyperslab + * Signature: (JI[J[J[J[J)J + */ +JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Scombine_1hyperslab(JNIEnv *, jclass, jlong, jint, jlongArray, + jlongArray, jlongArray, jlongArray); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Smodify_select + * Signature: (JIJ)V + */ +JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Smodify_1select(JNIEnv *, jclass, jlong, jint, jlong); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Scombine_select + * Signature: (JIJ)J + */ +JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Scombine_1select(JNIEnv *, jclass, jlong, jint, jlong); + #ifdef __cplusplus } /* end extern "C" */ #endif /* __cplusplus */ diff --git a/java/test/TestH5Sbasic.java b/java/test/TestH5Sbasic.java index 2173647..9874584 100644 --- a/java/test/TestH5Sbasic.java +++ b/java/test/TestH5Sbasic.java @@ -242,4 +242,142 @@ public class TestH5Sbasic { H5.H5Sdecode(null); } + @Test(expected = IllegalArgumentException.class) + public void testH5Sget_regular_hyperslab_invalid() throws Throwable { + long q_start[] = new long[2]; + long q_stride[] = new long[2]; + long q_count[] = new long[2]; + long q_block[] = new long[2]; + + H5.H5Sget_regular_hyperslab(-1, q_start, q_stride, q_count, q_block); + } + + @Test(expected = hdf.hdf5lib.exceptions.HDF5FunctionArgumentException.class) + public void testH5Sselect_copy_invalid() throws Throwable { + H5.H5Sselect_copy(-1, -1); + } + + @Test(expected = hdf.hdf5lib.exceptions.HDF5DataspaceInterfaceException.class) + public void testH5Sselect_shape_same_invalid() throws Throwable { + H5.H5Sselect_shape_same(-1, -1); + } + + @Test(expected = IllegalArgumentException.class) + public void testH5Sselect_adjust_invalid() throws Throwable { + long offset[][] = {{0,1},{2,4},{5,6}}; + H5.H5Sselect_adjust(-1, offset); + } + + @Test(expected = IllegalArgumentException.class) + public void testH5Sselect_adjust_rank_offset() throws Throwable { + long sid = -1; + long offset[][] = {{0,1},{2,4},{5,6}}; + + try { + sid = H5.H5Screate(HDF5Constants.H5S_SIMPLE); + assertTrue("H5.H5Screate_simple_extent",sid > 0); + H5.H5Sselect_adjust(sid, offset); + } + finally { + try {H5.H5Sclose(sid);} catch (Exception ex) {} + } + } + + @Test(expected = IllegalArgumentException.class) + public void testH5Sselect_intersect_block_invalid() throws Throwable { + long start[] = new long[2]; + long end[] = new long[2]; + H5.H5Sselect_intersect_block(-1, start, end); + } + + @Test(expected = IllegalArgumentException.class) + public void testH5Sselect_intersect_block_rank_start() throws Throwable { + long sid = -1; + long start[] = new long[2]; + long end[] = null; + + try { + sid = H5.H5Screate(HDF5Constants.H5S_SIMPLE); + assertTrue("H5.H5Screate_simple_extent",sid > 0); + H5.H5Sselect_intersect_block(sid, start, end); + } + finally { + try {H5.H5Sclose(sid);} catch (Exception ex) {} + } + } + + @Test(expected = IllegalArgumentException.class) + public void testH5Sselect_intersect_block_rank_end() throws Throwable { + long sid = -1; + long start[] = null; + long end[] = new long[2]; + + try { + sid = H5.H5Screate(HDF5Constants.H5S_SIMPLE); + assertTrue("H5.H5Screate_simple_extent",sid > 0); + H5.H5Sselect_intersect_block(sid, start, end); + } + finally { + try {H5.H5Sclose(sid);} catch (Exception ex) {} + } + } + + @Test(expected = hdf.hdf5lib.exceptions.HDF5DataspaceInterfaceException.class) + public void testH5Sselect_project_intersection_invalid() throws Throwable { + H5.H5Sselect_project_intersection(-1, -1, -1); + } + + @Test(expected = hdf.hdf5lib.exceptions.HDF5FunctionArgumentException.class) + public void testH5Scombine_hyperslab_invalid() throws Throwable { + long start[] = new long[2]; + long count[] = new long[2]; + H5.H5Scombine_hyperslab(-1, 0, start, null, count, null); + } + + @Test(expected = NullPointerException.class) + public void testH5Scombine_hyperslab_null_start() throws Throwable { + long sid = -1; + long start[] = null; + long stride[] = null; + long count[] = new long[2]; + long block[] = null; + + try { + sid = H5.H5Screate(HDF5Constants.H5S_SIMPLE); + assertTrue("H5.H5Screate_simple_extent",sid > 0); + H5.H5Scombine_hyperslab(sid, 0, start, stride, count, block); + } + finally { + try {H5.H5Sclose(sid);} catch (Exception ex) {} + } + } + + @Test(expected = NullPointerException.class) + public void testH5Scombine_hyperslab_null_count() throws Throwable { + long sid = -1; + long start[] = new long[2]; + long stride[] = null; + long count[] = null; + long block[] = null; + + try { + sid = H5.H5Screate(HDF5Constants.H5S_SIMPLE); + assertTrue("H5.H5Screate_simple_extent",sid > 0); + H5.H5Scombine_hyperslab(sid, 0, start, stride, count, block); + } + finally { + try {H5.H5Sclose(sid);} catch (Exception ex) {} + } + } + + @Test(expected = hdf.hdf5lib.exceptions.HDF5FunctionArgumentException.class) + public void testH5Smodify_select_invalid() throws Throwable { + H5.H5Smodify_select(-1, 0, -1); + } + + @Test(expected = hdf.hdf5lib.exceptions.HDF5FunctionArgumentException.class) + public void testH5Scombine_select_invalid() throws Throwable { + H5.H5Scombine_select(-1, 0, -1); + } + } diff --git a/java/test/testfiles/JUnit-TestH5Sbasic.txt b/java/test/testfiles/JUnit-TestH5Sbasic.txt index 707878e..3422442 100644 --- a/java/test/testfiles/JUnit-TestH5Sbasic.txt +++ b/java/test/testfiles/JUnit-TestH5Sbasic.txt @@ -5,18 +5,32 @@ JUnit version 4.11 .testH5Sdecode_null .testH5Screate_simple_dims_exceed .testH5Screate_simple_unlimted_1d +.testH5Sselect_intersect_block_rank_start +.testH5Sget_regular_hyperslab_invalid +.testH5Sselect_adjust_rank_offset .testH5Screate_simple_dims_invalid .testH5Screate_scalar .testH5Screate_simple +.testH5Sselect_project_intersection_invalid .testH5Screate_simple_rank_invalid .testH5Sget_simple_extent_type_invalid +.testH5Scombine_hyperslab_invalid +.testH5Scombine_hyperslab_null_count +.testH5Scombine_hyperslab_null_start .testH5Sencode_invalid .testH5Screate_null .testH5Screate_simple_extent .testH5Screate_invalid +.testH5Sselect_intersect_block_invalid +.testH5Sselect_adjust_invalid .testH5Screate_simple_unlimted +.testH5Sselect_shape_same_invalid +.testH5Smodify_select_invalid +.testH5Scombine_select_invalid +.testH5Sselect_copy_invalid +.testH5Sselect_intersect_block_rank_end Time: XXXX -OK (16 tests) +OK (30 tests) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 9376bda..15804f4 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -144,6 +144,14 @@ New Features Java Library: ---------------- + - Added new H5S functions. + + H5Sselect_copy, H5Sselect_shape_same, H5Sselect_adjust, + H5Sselect_intersect_block, H5Sselect_project_intersection, + H5Scombine_hyperslab, H5Smodify_select, H5Scombine_select + wrapper functions added. + + (ADB - 2020/10/27, HDFFV-10868) Tools: -- cgit v0.12