Package ucar.nc2.iosp

Class LayoutBBTiled

  • All Implemented Interfaces:
    Layout, LayoutBB

    public class LayoutBBTiled
    extends Object
    implements LayoutBB
    For datasets where the data are stored in chunks, and must be processed, eg compressed or filtered. The data is read, processed, and placed in a ByteBuffer. Chunks have an offset into the ByteBuffer. "Tiled" means that all chunks are assumed to be equal size. Chunks do not necessarily cover the array, missing data is possible. Used by HDF4 and HDF5.
    • Constructor Detail

      • LayoutBBTiled

        public LayoutBBTiled​(LayoutBBTiled.DataChunkIterator chunkIterator,
                             int[] chunkSize,
                             int elemSize,
                             Section wantSection)
        Constructor.
        Parameters:
        chunkIterator - iterator over all data chunks
        chunkSize - all chunks assumed to be the same size
        elemSize - size of an element in bytes.
        wantSection - the wanted section of data, contains a List of Range objects. Must be complete.
    • Method Detail

      • getTotalNelems

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

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

        public boolean hasNext()
        Description copied from interface: Layout
        Is there more to do?
        Specified by:
        hasNext in interface Layout
      • next

        public LayoutBB.Chunk next()
        Description copied from interface: Layout
        Get the next chunk, not null if hasNext() is true.
        Specified by:
        next in interface Layout
        Specified by:
        next in interface LayoutBB