code: public Result[] batch(List<? extends Row> actions) throws IOException {
      try {
        Object[] resultsOrErrors = new Object[actions.size()];
        batchCallback(actions, resultsOrErrors, null);
        // At this point we are guaranteed that the array only contains results,
        // if it had any errors, batch would've thrown an exception
        Result[] results = new Result[resultsOrErrors.length];
        System.arraycopy(resultsOrErrors, 0, results, 0, results.length);
        return results;
      } catch (InterruptedException e) {
        Thread.currentThread().interrupt();
        LOG.error("Encountered exception in batch(List<>).", e);
        throw new IOException("Batch error", e);
      }
    }
docs: <p>batch.</p>
  
  @param actions a {@link java.util.List} object.
  @return an array of {@link org.apache.hadoop.hbase.client.Result} objects.
  @throws java.io.IOException if any.