HDF5 is an efficient, well-documented, non-proprietary binary data format and library developed and maintained by the HDF Group. JHDF5 is a high-level API in Java for reading and writing HDF5 files, building on the libraries provided by the HDF Group.

Classes to get started

In order to get started with the API, see the HDF5Factory class.

For simple standard use, have a look at IHDF5SimpleWriter interface for read-write access and the IHDF5SimpleReader interface for read-only access.

If you need to perform advanced operations, see the IHDF5Writer interface for read-write access and the IHDF5Reader interface for read-only access.

Examples

A simple use case is writing a float[] to an HDF5 file and reading it again:

    IHDF5SimpleWriter writer = HDF5Factory.open("myfile.h5");
    float[] mydata = new float[1000];
    ...<fill mydata>>...
    writer.write("mydata", f);
    writer.close()
    ...
    IHDF5SimpleReader reader = HDF5Factory.openForReading("myfile.h5");
    float[] mydata = reader.readFloatArray("mydata");
    ...<use mydata>...
    reader.close();
    
For a working minimal program, see this example.

Other example programs:

See also the PDF documentation.