This article details several technical challenges (and their solutions) encountered during the development of NiCE plugins that utilize HDF5 and HDF5 Java libraries.
The example below lists the proper way to write an Attribute with a String Datatype (or its subclass H5Datatype) to the metadata of a Group (or its subclass H5Group). This method could not be located at the HDF5 website or any associated forums.
The example below lists the proper way to read the value of an Attribute with a String Datatype (or its subclass H5Datatype) from the metadata of a Group (or its subclass H5Group). This method could not be located at the HDF5 website or any associated forums.
When exploring an H5File using the HDFView Java program, all Datasets with a String Datatype (or its subclass H5Datatype) will be presented using the TextView perspective. For small Datasets, only the first column of Strings are shown. For larger Datasets, only lines are shown. This leads to a false positive belief that a bug has been encountered. By using the h5dump utility program, one can see that the String Datasets have been written successfully.
When writing data to a Compound Dataset, the init() method of the Dataset object must be called immediately before calling the write(Object data) method. If the init() method is not called, then all values within the Dataset will be zeroes.