code: public <T, U> U forStream(
              String fileName,
              Class<T> clazz,
              Map<String, Object> params,
              Function<? super Stream<T>, U> handleStream) {
          String sql = getTemplate(fileName, params);
          SqlParameterSource sps = paramBuilder.byMap(params);
          RowMapper<T> mapper = mapperBuilder.mapper(clazz);
          return queryStreamWithNamedParams(sql, sps, mapper, handleStream);
      }
docs: Executes a query using {@code params} as the named parameters,
  passing the row objects to {@code handleStream} as a stream.
  
  <p>Example usage:</p>
  
  <pre>
  Map&lt;String, Object&gt; params = new HashMap&gt;&lt;();
  params.put("deptno", 30);
  params.put("job", "SALESMAN");
  int totalSalary = sqlTemplate.forStream("/path/to/query.sql", Emp.class, params,
  empStream -&gt; empStream.mapToInt(Emp::getSalary).sum());
  </pre>
  
  @param fileName parameterized SQL specifier
  @param clazz the result object class
  @param params the named parameters
  @param handleStream  the function which is applied to the stream
  @param <T> the row object type
  @param <U> the result type
  @return the result of {@code handleStream}
  @throws org.springframework.dao.DataAccessException if there is any problem