ucar.nc2.iosp
Class Indexer.Chunk

java.lang.Object
  extended by ucar.nc2.iosp.Indexer.Chunk
Enclosing class:
Indexer

public class Indexer.Chunk
extends java.lang.Object

A chunk of data that is contiguous in both the source and destination. Read nelems from src at filePos, store in destination at startElem. (or) Write nelems to file at filePos, from array at startElem.


Constructor Summary
Indexer.Chunk(long filePos, int nelems, long startElem)
           
 
Method Summary
 long getFilePos()
          Get the position in source where to read or write: "file position"
 int getNelems()
           
 long getStartElem()
          Get starting element position as a 1D element index in the array with shape "wantSection".
 void incrFilePos(int incr)
           
 void incrStartElem(int incr)
           
 void setFilePos(long filePos)
           
 void setNelems(int nelems)
           
 void setStartElem(long startElem)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Indexer.Chunk

public Indexer.Chunk(long filePos,
                     int nelems,
                     long startElem)
Method Detail

getFilePos

public long getFilePos()
Get the position in source where to read or write: "file position"

Returns:
position as a byte count

setFilePos

public void setFilePos(long filePos)

incrFilePos

public void incrFilePos(int incr)

getNelems

public int getNelems()
Returns:
number of elements to transfer contiguously (Note: elements, not bytes)

setNelems

public void setNelems(int nelems)

getStartElem

public long getStartElem()
Get starting element position as a 1D element index in the array with shape "wantSection".

Returns:
starting element in the array: "starting array element" (Note: elements, not bytes)

setStartElem

public void setStartElem(long startElem)

incrStartElem

public void incrStartElem(int incr)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object