appendToDataset

fnvoid appendToDataset(hid_t datasetId, uint axis, size_t extension, hid_t memtype, const void * data, hid_t dxpl = H5P_DEFAULT)

Appends data to a chunked dataset along a specified dimension.

This function is designed for use cases where data is continuously added to a dataset, such as time-series data collection. The dataset must be chunked and have unlimited dimensions along the append axis.

Parameters

datasetIdDataset identifier (must be chunked)
axisDimension along which to append (0-based index)
extensionNumber of elements to extend the dataset
memtypeMemory datatype identifier
dataPointer to the data buffer to append
dxplDataset transfer property list (default: H5P_DEFAULT)

Throws

HDF5Exception if the append operation fails

Example:

// Append 100 new rows to a 2D dataset
double[] newData = new double[100 * numCols];
// ... fill newData ...
appendToDataset(dataset.handle(), 0, 100, H5T_NATIVE_DOUBLE, newData.ptr);