public static void write(HDF5Group root, File path, boolean overwrite)
throws IOException {
HdfFileWriter writer = create(path, overwrite);
Map<HDF5Dataset, HdfGroup> datasetRegistry = new HashMap<>();
// Define group, attribute and datasets' table of content
writeGroup(root, writer.getRootGroup(), datasetRegistry);
// End define
try {
writer.endDefine();
} catch (HdfException e) {
throw new IOException(e);
}
// Write datasets' data
writeDatasetsData(datasetRegistry);
// Close
try {
writer.close();
} catch (HdfException e) {
throw new IOException(e);
}
}