Package nz.org.riskscape.hdf5
Class H5File
java.lang.Object
nz.org.riskscape.hdf5.H5Object
nz.org.riskscape.hdf5.H5File
- All Implemented Interfaces:
AutoCloseable
Gives access to datasets stored within an hdf5 file on the filesystem.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
acceptRootGroup
(Consumer<H5Group> callback) Convenience version of getRootGroup that handles closing the root group object for you.<T> T
applyRootGroup
(Function<H5Group, T> callback) Convenience version of getRootGroup that handles closing the root group object for you.void
close()
openDataset
(String groupPath, String datasetName) openDataset
(H5DatasetPath datasetId) openObject
(String path) Methods inherited from class nz.org.riskscape.hdf5.H5Object
getPointer
-
Constructor Details
-
H5File
-
H5File
-
-
Method Details
-
getRootGroup
- Returns:
- the root {@link H5Group. You are responsible for closing this group, maybe use acceptRootGroup or applyRootGroup for callback versions that close the group for you
-
applyRootGroup
Convenience version of getRootGroup that handles closing the root group object for you. Applies a function to the root group, returning the result after closing the root group object
-
acceptRootGroup
Convenience version of getRootGroup that handles closing the root group object for you. Applies a callback to the root group, closing the root group object once it has run
-
openObject
-
openDataset
-
openDataset
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in classH5Object
-