summaryrefslogtreecommitdiffstats
path: root/java/src/hdf
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/hdf')
-rw-r--r--java/src/hdf/CMakeLists.txt2
-rw-r--r--java/src/hdf/hdf5lib/CMakeLists.txt2
-rw-r--r--java/src/hdf/hdf5lib/H5.java10
-rw-r--r--java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java36
-rw-r--r--java/src/hdf/hdf5lib/structs/H5O_info_t.java4
-rw-r--r--java/src/hdf/hdf5lib/structs/H5_ih_info_t.java18
6 files changed, 64 insertions, 8 deletions
diff --git a/java/src/hdf/CMakeLists.txt b/java/src/hdf/CMakeLists.txt
index 161ddf1..5660158 100644
--- a/java/src/hdf/CMakeLists.txt
+++ b/java/src/hdf/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_JAVA_HDF C)
add_subdirectory (hdf5lib)
diff --git a/java/src/hdf/hdf5lib/CMakeLists.txt b/java/src/hdf/hdf5lib/CMakeLists.txt
index be8f60a..e07f210 100644
--- a/java/src/hdf/hdf5lib/CMakeLists.txt
+++ b/java/src/hdf/hdf5lib/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_JAVA_HDF_HDF5 Java)
set (CMAKE_VERBOSE_MAKEFILE 1)
diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java
index ce6e7d4..7681c48 100644
--- a/java/src/hdf/hdf5lib/H5.java
+++ b/java/src/hdf/hdf5lib/H5.java
@@ -1107,7 +1107,9 @@ public class H5 implements java.io.Serializable {
log.trace("H5Aread_dname_D");
status = H5Aread_double(attr_id, mem_type_id, (double[]) obj, isCriticalPinning);
}
- else if ((H5.H5Tdetect_class(mem_type_id, HDF5Constants.H5T_REFERENCE) && (is1D && (dataClass.getComponentType() == String.class))) || H5.H5Tequal(mem_type_id, HDF5Constants.H5T_STD_REF_DSETREG)) {
+ else if ((H5.H5Tdetect_class(mem_type_id, HDF5Constants.H5T_REFERENCE) &&
+ (is1D && (dataClass.getComponentType() == String.class))) ||
+ H5.H5Tequal(mem_type_id, HDF5Constants.H5T_STD_REF_DSETREG)) {
log.trace("H5Aread_reg_ref");
status = H5Aread_reg_ref(attr_id, mem_type_id, (String[]) obj);
}
@@ -2005,7 +2007,9 @@ public class H5 implements java.io.Serializable {
status = H5Dread_double(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id,
(double[]) obj, isCriticalPinning);
}
- else if ((H5.H5Tdetect_class(mem_type_id, HDF5Constants.H5T_REFERENCE) && (is1D && (dataClass.getComponentType() == String.class))) || H5.H5Tequal(mem_type_id, HDF5Constants.H5T_STD_REF_DSETREG)) {
+ else if ((H5.H5Tdetect_class(mem_type_id, HDF5Constants.H5T_REFERENCE) &&
+ (is1D && (dataClass.getComponentType() == String.class))) ||
+ H5.H5Tequal(mem_type_id, HDF5Constants.H5T_STD_REF_DSETREG)) {
log.trace("H5Dread_reg_ref");
status = H5Dread_reg_ref(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id,
(String[]) obj);
@@ -3563,7 +3567,7 @@ public class H5 implements java.io.Serializable {
public synchronized static int H5Gget_obj_info_all(long loc_id, String name, String[] oname, int[] otype,
int[] ltype, long[] fno, long[] ref, int indx_type) throws HDF5LibraryException, NullPointerException {
- return H5Gget_obj_info_full(loc_id, name, oname, otype, ltype, fno, ref, oname.length, indx_type, -1);
+ return H5Gget_obj_info_full(loc_id, name, oname, otype, ltype, fno, ref, indx_type, -1);
}
public synchronized static int H5Gget_obj_info_full(long loc_id, String name, String[] oname, int[] otype,
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 a39c1ed..8d0cc24 100644
--- a/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java
+++ b/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java
@@ -16,7 +16,7 @@ package hdf.hdf5lib.structs;
import java.io.Serializable;
// Information struct for object header metadata (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx)
-public class H5O_hdr_info_t implements Serializable{
+public class H5O_hdr_info_t implements Serializable {
private static final long serialVersionUID = 7883826382952577189L;
public int version; /* Version number of header format in file */
public int nmesgs; /* Number of object header messages */
@@ -44,4 +44,38 @@ public class H5O_hdr_info_t implements Serializable{
this.mesg_present = mesg_present;
this.mesg_shared = mesg_shared;
}
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o)
+ return true;
+
+ if (!(o instanceof H5O_hdr_info_t))
+ return false;
+
+ H5O_hdr_info_t info = (H5O_hdr_info_t) o;
+
+ if (this.version != info.version)
+ return false;
+ if (this.nmesgs != info.nmesgs)
+ return false;
+ if (this.nchunks != info.nchunks)
+ return false;
+ if (this.flags != info.flags)
+ return false;
+ if (this.space_total != info.space_total)
+ return false;
+ if (this.space_meta != info.space_meta)
+ return false;
+ if (this.space_mesg != info.space_mesg)
+ return false;
+ if (this.space_free != info.space_free)
+ return false;
+ if (this.mesg_present != info.mesg_present)
+ return false;
+ if (this.mesg_shared != info.mesg_shared)
+ return false;
+
+ return true;
+ }
}
diff --git a/java/src/hdf/hdf5lib/structs/H5O_info_t.java b/java/src/hdf/hdf5lib/structs/H5O_info_t.java
index ac32f6a..5dd078f 100644
--- a/java/src/hdf/hdf5lib/structs/H5O_info_t.java
+++ b/java/src/hdf/hdf5lib/structs/H5O_info_t.java
@@ -15,8 +15,8 @@ package hdf.hdf5lib.structs;
import java.io.Serializable;
-//Information struct for object (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx)
-public class H5O_info_t implements Serializable{
+// 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 */
public long addr; /* Object address in file */
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 ea36d85..7159f02 100644
--- a/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java
+++ b/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java
@@ -26,4 +26,22 @@ public class H5_ih_info_t implements Serializable {
this.index_size = index_size;
this.heap_size = heap_size;
}
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o)
+ return true;
+
+ if (!(o instanceof H5_ih_info_t))
+ return false;
+
+ H5_ih_info_t info = (H5_ih_info_t) o;
+
+ if (this.index_size != info.index_size)
+ return false;
+ if (this.heap_size != info.heap_size)
+ return false;
+
+ return true;
+ }
}