default Result[] next(int nbRows) throws IOException {
    List<Result> resultSets = new ArrayList<>(nbRows);
    for (int i = 0; i < nbRows; i++) {
      Result next = next();
      if (next != null) {
        resultSets.add(next);
      } else {
        break;
      }
    }
    return resultSets.toArray(new Result[0]);
  }
Get nbRows rows. How many RPCs are made is determined by the {@link Scan#setCaching(int)}
setting (or hbase.client.scanner.caching in hbase-site.xml).
@param nbRows number of rows to return
@return Between zero and nbRows rowResults. Scan is done if returned array is of zero-length
        (We never return null).
hbase-client/src/main/java/org/apache/hadoop/hbase/client/ResultScanner.java