Package ucar.nc2.iosp
Interface LayoutBB
-
- All Superinterfaces:
Layout
- All Known Implementing Classes:
LayoutBBTiled
public interface LayoutBB extends Layout
A Layout that supplies the "source" ByteBuffer. This is used when the data must be massaged after being read, eg uncompresed or filtered. The modified data is placed in a ByteBuffer, which may change for different chunks, and so is supplied by each chunk. Example for Integers:int[] read(LayoutBB index, int[] pa) { while (index.hasNext()) { LayoutBB.Chunk chunk = index.next(); IntBuffer buff = chunk.getIntBuffer(); buff.position(chunk.getSrcElem()); int pos = (int) chunk.getDestElem(); for (int i = 0; i < chunk.getNelems(); i++) pa[pos++] = buff.get(); } return pa; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
LayoutBB.Chunk
A contiguous chunk of data as a ByteBuffer.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LayoutBB.Chunk
next()
Get the next chunk, not null if hasNext() is true.-
Methods inherited from interface ucar.nc2.iosp.Layout
getElemSize, getTotalNelems, hasNext
-
-
-
-
Method Detail
-
next
LayoutBB.Chunk next()
Description copied from interface:Layout
Get the next chunk, not null if hasNext() is true.
-
-