public ResultSetSlice(java.sql.ResultSet rs, Integer lo, Integer hi) 
    throws SQLException {
    this.rs = rs;
    rowCount = rs.last() ? rs.getRow() : 0;
    columnCount = rs.getMetaData().getColumnCount();
    first = lo.intValue();
    last = Math.min(hi.intValue(), rowCount);
    sliceRowCount = last + 1 - first;
  }