public class HDF5DataSetTemplate
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 createArrayTemplate()
from one of the primitive writers and use it
in that writer to specify the parameters of a new data set. As it caches HDF5 objects, it will speed up the creation
process for repeated creation of data sets with the same template parameters.
A typical pattern for using this class is:
try (final HDF5DataSetTemplate tmpl = writer.float32().createArrayTemplate(length, length, HDF5IntStorageFeatures.INT_CONTIGUOUS)) { for (int i = 0; i < num; ++i) { writer.float32().writeArray("ds" + i, array[i], tmpl); } }Assigning the
HDF5DataSetTemplate
object in a try()
block is a recommened practice to
ensure that the underlying HDF5 objects are properly closed at the end.Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |