Package ubic.gemma.core.loader.util.hdf5
Class H5Dataset.H5Dataspace
java.lang.Object
ubic.gemma.core.loader.util.hdf5.H5Dataset.H5Dataspace
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
H5Dataset
Represents a dataspace selection of a
H5Dataset.
When collecting the space (i.e. using toByteVector(long)}), the underlying HDF5 resource is closed
automatically.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()longsize()Obtain the size of this dataspace.boolean[]voidtoByteVector(byte[] buf, long start, long end, long scalarType) Write the dataspace into a slice of a target.byte[]toByteVector(long scalarType) double[]int[]
-
Method Details
-
toByteVector
Write the dataspace into a slice of a target.The start and end are expressed in terms of number of datapoints. The slice must contain exactly
size()datapoints to be valid.The dataspace is closed once the operation is completed and should no-longer be used.
- Parameters:
buf- a target buffer of size(end - start) * sizeof(scalarType)start- start of a slice. inclusiveend- end of a slice, exclusivescalarType- a datatype to write into the buffer
-
toByteVector
-
toBooleanVector
public boolean[] toBooleanVector() -
toIntegerVector
-
toDoubleVector
-
size
public long size()Obtain the size of this dataspace. -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-