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
public class H5Dataset.H5Dataspace extends Object implements AutoCloseable
Represents a dataspace selection of aH5Dataset
.When collecting the space (i.e. using
toByteVector(long)
}), the underlying HDF5 resource is closed automatically.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
long
size()
Obtain the size of this dataspace.boolean[]
toBooleanVector()
void
toByteVector(byte[] buf, int start, int end, long scalarType)
Write the dataspace into a slice of a target.byte[]
toByteVector(long scalarType)
double[]
toDoubleVector()
int[]
toIntegerVector()
-
-
-
Method Detail
-
toByteVector
@WillClose public void toByteVector(byte[] buf, int start, int end, long scalarType)
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
@WillClose public byte[] toByteVector(long scalarType)
-
toBooleanVector
public boolean[] toBooleanVector()
-
toIntegerVector
@WillClose public int[] toIntegerVector()
-
toDoubleVector
@WillClose public double[] toDoubleVector()
-
size
public long size()
Obtain the size of this dataspace.
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
-
-