Package ucar.nc2.iosp
Class LayoutBBTiled
java.lang.Object
ucar.nc2.iosp.LayoutBBTiled
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.
- Since:
- Jan 9, 2008
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA data chunkstatic interfaceAn iterator over the data chunks. -
Constructor Summary
ConstructorsConstructorDescriptionLayoutBBTiled(LayoutBBTiled.DataChunkIterator chunkIterator, int[] chunkSize, int elemSize, Section wantSection) Constructor. -
Method Summary
-
Constructor Details
-
LayoutBBTiled
public LayoutBBTiled(LayoutBBTiled.DataChunkIterator chunkIterator, int[] chunkSize, int elemSize, Section wantSection) Constructor.- Parameters:
chunkIterator- iterator over all data chunkschunkSize- all chunks assumed to be the same sizeelemSize- size of an element in bytes.wantSection- the wanted section of data, contains a List of Range objects. Must be complete.
-
-
Method Details
-
getTotalNelems
public long getTotalNelems()Description copied from interface:LayoutBBGet total number of elements in the wanted subset.- Specified by:
getTotalNelemsin interfaceLayout- Specified by:
getTotalNelemsin interfaceLayoutBB- Returns:
- total number of elements in the wanted subset.
-
getElemSize
public int getElemSize()Description copied from interface:LayoutBBGet size of each element in bytes.- Specified by:
getElemSizein interfaceLayout- Specified by:
getElemSizein interfaceLayoutBB- Returns:
- size of each element in bytes.
-
hasNext
public boolean hasNext()Description copied from interface:LayoutBBIs there more to do -
next
Description copied from interface:LayoutBBGet the next chunk -
toString
-