|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LayoutBB
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 | |
---|---|
static interface |
LayoutBB.Chunk
A chunk of data that is contiguous in both the source and destination. |
Method Summary | |
---|---|
int |
getElemSize()
Get size of each element in bytes. |
long |
getTotalNelems()
Get total number of elements in the wanted subset. |
boolean |
hasNext()
Is there more to do |
LayoutBB.Chunk |
next()
Get the next chunk |
Method Detail |
---|
long getTotalNelems()
getTotalNelems
in interface Layout
int getElemSize()
getElemSize
in interface Layout
boolean hasNext()
hasNext
in interface Layout
LayoutBB.Chunk next() throws IOException
next
in interface Layout
IOException
- on i/o error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |