ucar.ma2
Class ArrayStructureBBpos

java.lang.Object
  extended by ucar.ma2.Array
      extended by ucar.ma2.ArrayStructure
          extended by ucar.ma2.ArrayStructureBB
              extended by ucar.ma2.ArrayStructureBBpos

public class ArrayStructureBBpos
extends ArrayStructureBB

Variation of ArrayStructureBB, where the offsets into the ByteBuffer are uneven and must be passed in by the user.

Version:
$Revision: 51 $ $Date: 2006-07-12 17:13:13Z $
Author:
caron

Field Summary
protected  int[] positions
           
 
Fields inherited from class ucar.ma2.ArrayStructureBB
bb_offset, bbuffer
 
Fields inherited from class ucar.ma2.ArrayStructure
members, nelems, sdata
 
Fields inherited from class ucar.ma2.Array
indexCalc, rank, scalarIndex
 
Constructor Summary
ArrayStructureBBpos(StructureMembers members, int[] shape, java.nio.ByteBuffer bbuffer, int[] positions)
          Construct an ArrayStructureBB with the given ByteBuffer.
 
Method Summary
protected  int calcOffset(int recnum, StructureMembers.Member m)
           
 
Methods inherited from class ucar.ma2.ArrayStructureBB
getArrayStructure, getJavaArrayByte, getJavaArrayChar, getJavaArrayDouble, getJavaArrayFloat, getJavaArrayInt, getJavaArrayLong, getJavaArrayShort, getJavaArrayString, getScalarByte, getScalarChar, getScalarDouble, getScalarFloat, getScalarInt, getScalarLong, getScalarShort, getScalarString, getScalarStructure, getStorage, main, makeStructureData
 
Methods inherited from class ucar.ma2.ArrayStructure
convertScalarDouble, copy, createView, getArray, getArrayByte, getArrayChar, getArrayDouble, getArrayFloat, getArrayInt, getArrayLong, getArrayShort, getArrayString, getBoolean, getByte, getChar, getDouble, getElementType, getFloat, getInt, getLong, getObject, getObject, getObject, getScalarObject, getShort, getStructureData, getStructureData, getStructureMembers, getStructureSize, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setObject, setShort
 
Methods inherited from class ucar.ma2.Array
arraycopy, copyTo1DJavaArray, copyToNDJavaArray, factory, factory, factory, factory, factoryConstant, flip, get1DJavaArray, getIndex, getIndexIterator, getIndexIteratorFast, getIndexName, getRangeIterator, getRank, getShape, getSize, permute, reduce, reduce, reshape, section, section, section, sectionNoReduce, sectionNoReduce, setIndexName, shapeToString, slice, toString, transpose
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

positions

protected int[] positions
Constructor Detail

ArrayStructureBBpos

public ArrayStructureBBpos(StructureMembers members,
                           int[] shape,
                           java.nio.ByteBuffer bbuffer,
                           int[] positions)
Construct an ArrayStructureBB with the given ByteBuffer.

Parameters:
members - the list of structure members.
shape - the shape of the structure array
bbuffer - the data is stored in this ByteBuffer. bbuffer.order must already be set.
positions - offset from the start of the ByteBufffer to each record. must have length consistent with shape.
Method Detail

calcOffset

protected int calcOffset(int recnum,
                         StructureMembers.Member m)
Overrides:
calcOffset in class ArrayStructureBB