Menu

Challenges_Using_HDF5_and_Java

Scott Forest Hull II Eric Lingerfelt Dasha
There is a newer version of this page. You can find it here.

This article details several technical challenges (and their solutions) encountered during the development of NiCE plugins that utilize HDF5 and HDF5 Java libraries.

Writing a String Attribute to a Group's Metadata

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.

Reading a String Attribute from a Group's Metadata

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.

HDFView and Viewing String Datatypes

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.

Writing Data to Compound Datasets

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.


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.