Class H5tiledLayoutBB

  • All Implemented Interfaces:
    Layout, LayoutBB

    public class H5tiledLayoutBB
    extends Object
    implements LayoutBB
    Iterator to read/write subsets of an array. This calculates byte offsets for HD5 chunked datasets. Assumes that the data is stored in chunks, indexed by a Btree. Used for filtered data Had to split from old H5tiledLayoutBB because need to use H5headerNew.Vinfo.
    • Field Detail

      • debugFilter

        public static boolean debugFilter
    • Constructor Detail

      • H5tiledLayoutBB

        public H5tiledLayoutBB​(Variable v2,
                               Section wantSection,
                               RandomAccessFile raf,
                               ucar.nc2.internal.iosp.hdf5.H5objects.Filter[] filterProps,
                               ByteOrder byteOrder)
                        throws InvalidRangeException,
                               IOException
        Constructor. This is for HDF5 chunked data storage. The data is read by chunk, for efficiency.
        Parameters:
        v2 - Variable to index over; assumes that vinfo is the data object
        wantSection - the wanted section of data, contains a List of Range objects. must be complete
        raf - the RandomAccessFile
        filterProps - set of filter properties from which filter object will be created
        Throws:
        InvalidRangeException - if section invalid for this variable
        IOException - on io error
    • Method Detail

      • getTotalNelems

        public long getTotalNelems()
        Description copied from interface: LayoutBB
        Get total number of elements in the wanted subset.
        Specified by:
        getTotalNelems in interface Layout
        Specified by:
        getTotalNelems in interface LayoutBB
        Returns:
        total number of elements in the wanted subset.
      • getElemSize

        public int getElemSize()
        Description copied from interface: LayoutBB
        Get size of each element in bytes.
        Specified by:
        getElemSize in interface Layout
        Specified by:
        getElemSize in interface LayoutBB
        Returns:
        size of each element in bytes.
      • hasNext

        public boolean hasNext()
        Description copied from interface: LayoutBB
        Is there more to do
        Specified by:
        hasNext in interface Layout
        Specified by:
        hasNext in interface LayoutBB
        Returns:
        true if theres more to do
      • next

        public LayoutBB.Chunk next()
        Description copied from interface: LayoutBB
        Get the next chunk
        Specified by:
        next in interface Layout
        Specified by:
        next in interface LayoutBB
        Returns:
        next chunk, or null if !hasNext()