508509510511512513514515516517518
else end = Math.min(offset + limit, rows.length); if (offset == -1) offset = 0; // we start at zero even so for (int ix = offset; ix < end; ix++) result.addRow(rows[ix]); pages++; return result; }