class RowCountDeterminedClientResult extends ClientResult {

    public RowCountDeterminedClientResult(ClientSession session, TransferInputStream in, int resultId,
            int columnCount, int rowCount, int fetchSize) throws IOException {
        super(session, in, resultId, columnCount, rowCount, fetchSize);
    }

    @Override
    public boolean next() {
        if (rowId < rowCount) {
            rowId++;
            remapIfOld();
            if (rowId < rowCount) {
                if (rowId - rowOffset >= result.size()) {
                    fetchRows(true);
                }
                currentRow = result.get(rowId - rowOffset);
                return true;
            }
            currentRow = null;
        }
        return false;
    }

    @Override
    protected void fetchRows(boolean sendFetch) {<FILL_FUNCTION_BODY>}
}

        session.checkClosed();
        try {
            rowOffset += result.size();
            result.clear();
            int fetch = Math.min(fetchSize, rowCount - rowOffset);
            if (sendFetch) {
                sendFetch(fetch);
            }
            for (int r = 0; r < fetch; r++) {
                boolean row = in.readBoolean();
                if (!row) {
                    break;
                }
                int len = columns.length;
                Value[] values = new Value[len];
                for (int i = 0; i < len; i++) {
                    Value v = in.readValue();
                    values[i] = v;
                }
                result.add(values);
            }
            if (rowOffset + result.size() >= rowCount) {
                sendClose();
            }
        } catch (IOException e) {
            throw DbException.convertIOException(e, null);
        }
    
<methods>public void <init>(com.lealone.client.session.ClientSession, com.lealone.net.TransferInputStream, int, int, int, int) throws java.io.IOException,public void close() ,public com.lealone.db.value.Value[] currentRow() ,public java.lang.String getAlias(int) ,public java.lang.String getColumnName(int) ,public long getColumnPrecision(int) ,public int getColumnScale(int) ,public int getColumnType(int) ,public int getCurrentRowCount() ,public int getDisplaySize(int) ,public int getFetchSize() ,public int getNullable(int) ,public int getRowCount() ,public int getRowId() ,public java.lang.String getSchemaName(int) ,public java.lang.String getTableName(int) ,public int getVisibleColumnCount() ,public boolean isAutoIncrement(int) ,public boolean needToClose() ,public abstract boolean next() ,public void reset() ,public void setFetchSize(int) ,public java.lang.String toString() <variables>protected final non-sealed com.lealone.client.result.ClientResultColumn[] columns,protected com.lealone.db.value.Value[] currentRow,protected int fetchSize,protected com.lealone.net.TransferInputStream in,protected ArrayList<com.lealone.db.value.Value[]> result,protected int resultId,protected final non-sealed int rowCount,protected int rowId,protected int rowOffset,protected com.lealone.client.session.ClientSession session