dap4/d4lib/src/main/java/dap4/dap4lib/serial/D4DataCompiler.java
public D4Cursor
    compileSequence(DapVariable var, DapSequence dapseq, D4Cursor container)
            throws DapException
    {
        int pos = getPos(this.databuffer);
        D4Cursor seq = new D4Cursor(Scheme.SEQUENCE, this.dsp, var, container)
                .setOffset(pos);
        List<DapVariable> dfields = dapseq.getFields();
        // Get the count of the number of records
        long nrecs = getCount(this.databuffer);
        for(int r = 0; r < nrecs; r++) {
            pos = getPos(this.databuffer);
            D4Cursor rec = (D4Cursor) new D4Cursor(D4Cursor.Scheme.RECORD, this.dsp, var, container)
                    .setOffset(pos).setRecordIndex(r);
            for(int m = 0; m < dfields.size(); m++) {
                DapVariable dfield = dfields.get(m);
                D4Cursor dvfield = compileVar(dfield, rec);
                rec.addField(m, dvfield);
                assert dfield.getParent() != null;
            }
            seq.addRecord(rec);
        }
        return seq;
    }
public D4Cursor
    compileSequence(DapVariable var, DapSequence dapseq, D4Cursor container)
            throws DapException
    {
        int pos = getPos(this.databuffer);
        D4Cursor seq = new D4Cursor(Scheme.SEQUENCE, this.dsp, var, container)
                .setOffset(pos);
        List<DapVariable> dfields = dapseq.getFields();
        // Get the count of the number of records
        long nrecs = getCount(this.databuffer);
        for(int r = 0; r < nrecs; r++) {
            pos = getPos(this.databuffer);
            D4Cursor rec = (D4Cursor) new D4Cursor(D4Cursor.Scheme.RECORD, this.dsp, var, container)
                    .setOffset(pos).setRecordIndex(r);
            for(int m = 0; m < dfields.size(); m++) {
                DapVariable dfield = dfields.get(m);
                D4Cursor dvfield = compileVar(dfield, rec);
                rec.addField(m, dvfield);
                assert dfield.getParent() != null;
            }
            seq.addRecord(rec);
        }
        return seq;
    }
Compile a sequence as a set of records.

@param dapseq
@param container
@return
@throws DapException