public class HDF5DataSet
extends java.lang.Object
implements java.lang.AutoCloseable
Close it after usage is finished as otherwise you will leak resources from the HDF5 library.
Open the object using the method IHDF5ObjectReadOnlyInfoProviderHandler.openDataSet(String) and use it
in readers and writers instead of the data set path. As it caches HDF5 objects, it will speed up the access
for repeated access to the same data set.
A typical pattern for using this class is:
try (final HDF5DataSet ds = reader.object().openDataSet("/path/to/dataset"))
{
for (long bx = 0; bx < 8; ++bx)
{
final float[] dataRead =
reader.float32().readArrayBlock(ds, length, bx);
... work with dataRead ...
}
}
Assigning the HDF5DataSet object in a try() block is a recommened practice to ensure that
the underlying HDF5 object is properly closed at the end.| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getDataSetPath()
Returns the path of this data set.
|
int |
hashCode() |
public java.lang.String getDataSetPath()
public void close()
close in interface java.lang.AutoCloseablepublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object