com.opencsv.CSVReader.iterator()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(140)

本文整理了Java中com.opencsv.CSVReader.iterator()方法的一些代码示例,展示了CSVReader.iterator()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。CSVReader.iterator()方法的具体详情如下:
包路径:com.opencsv.CSVReader
类名称:CSVReader
方法名:iterator

CSVReader.iterator介绍

[英]Creates an Iterator for processing the CSV data.
[中]创建用于处理CSV数据的迭代器。

代码示例

代码示例来源:origin: twosigma/beakerx

CSVIterator(CSVReader csvReader) {
 reader = csvReader;
 rows = reader.iterator();
 header = rows.next();
}

代码示例来源:origin: apache/incubator-gobblin

PeekingIterator<String[]> iterator = Iterators.peekingIterator(reader.iterator());

代码示例来源:origin: com.ksc.mission.base/file

public CloseableReader(CSVReader reader) {
  iteratorSupplier = () -> reader.iterator();
  closer = () -> { 
    try {
      reader.close();
    } catch (IOException e) {
      e.printStackTrace();
    }
    return null;
  };
}

代码示例来源:origin: io.mindmaps/migration-csv

/**
 * Convert native data format (CSVReader) to stream of templates
 * @param template parametrized graql insert query
 * @param reader CSV reader of data file
 * @return Stream of data migrated into templates
 * @throws IOException
 */
private Stream<String> resolve(String template, CSVReader reader) throws IOException {
  String[] header = reader.readNext();
  return partitionedStream(reader.iterator())
      .map(batch -> batchParse(header, batch))
      .map(data -> template(template, data));
}

代码示例来源:origin: org.apache.gobblin/gobblin-core

PeekingIterator<String[]> iterator = Iterators.peekingIterator(reader.iterator());

相关文章