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 a H5Dataset.

When collecting the space (i.e. using toByteVector(long)}), the underlying HDF5 resource is closed automatically.

  • Method Details

    • toByteVector

      @WillClose public void toByteVector(byte[] buf, long start, long 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. inclusive
      end - end of a slice, exclusive
      scalarType - 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 interface AutoCloseable