dap4/d4lib/src/main/java/dap4/dap4lib/serial/D4DataCompiler.java
protected D4Cursor
    compileStructureArray(DapVariable var, D4Cursor container)
            throws DapException
    {
        DapStructure dapstruct = (DapStructure) var.getBaseType();
        D4Cursor structarray = new D4Cursor(Scheme.STRUCTARRAY, this.dsp, var, container)
                .setOffset(getPos(this.databuffer));
        List<DapDimension> dimset = var.getDimensions();
        long dimproduct = DapUtil.dimProduct(dimset);
        D4Cursor[] instances = new D4Cursor[(int) dimproduct];
        Odometer odom = Odometer.factory(DapUtil.dimsetToSlices(dimset), dimset);
        while(odom.hasNext()) {
            Index index = odom.next();
            D4Cursor instance = compileStructure(var, dapstruct, structarray);
            instance.setIndex(index);
            instances[(int) index.index()] = instance;
        }
        structarray.setElements(instances);
        return structarray;
    }
protected D4Cursor
    compileStructureArray(DapVariable var, D4Cursor container)
            throws DapException
    {
        DapStructure dapstruct = (DapStructure) var.getBaseType();
        D4Cursor structarray = new D4Cursor(Scheme.STRUCTARRAY, this.dsp, var, container)
                .setOffset(getPos(this.databuffer));
        List<DapDimension> dimset = var.getDimensions();
        long dimproduct = DapUtil.dimProduct(dimset);
        D4Cursor[] instances = new D4Cursor[(int) dimproduct];
        Odometer odom = Odometer.factory(DapUtil.dimsetToSlices(dimset), dimset);
        while(odom.hasNext()) {
            Index index = odom.next();
            D4Cursor instance = compileStructure(var, dapstruct, structarray);
            instance.setIndex(index);
            instances[(int) index.index()] = instance;
        }
        structarray.setElements(instances);
        return structarray;
    }
Compile a structure array.

@param var    the template
@param container if inside a compound object
@return A DataCompoundArray for the databuffer for this struct.
@throws DapException