private static void writeDatasetsData(
Map<HDF5Dataset, HdfGroup> datasetRegistry) throws IOException {
Object datasetData;
int[] datasetDims;
HdfGroup datasetWriter;
int[] startIxs;
for (Entry<HDF5Dataset, HdfGroup> entry : datasetRegistry.entrySet()) {
datasetData = entry.getKey().getData();
datasetDims = entry.getKey().getDimensions();
datasetWriter = entry.getValue();
startIxs = datasetDims.clone();
Arrays.fill(startIxs, 0);
try {
datasetWriter.writeData(startIxs, datasetData, false);
} catch (HdfException e) {
throw new IOException(e);
}
}
}