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

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

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

CSVReader.getNextLine介绍

[英]Reads the next line from the file.
[中]从文件中读取下一行。

代码示例

代码示例来源:origin: net.sf.opencsv/opencsv

String nextLine = getNextLine();
if (!hasNext) {
  return result; // should throw if still pending?

代码示例来源:origin: rogerta/secrets-for-android

/**
 * Reads the next line from the buffer and converts to a string array.
 *
 * @return a string array with each comma-separated element as a separate
 *         entry.
 *
 * @throws IOException
 *             if bad things happen during the read
 */
public String[] readNext() throws IOException {
  String nextLine = getNextLine();
  return hasNext ? parseLine(nextLine) : null;
}

代码示例来源:origin: rogerta/secrets-for-android

nextLine = getNextLine();
if (nextLine == null)
  break;

代码示例来源:origin: jlawrie/opencsv

/**
 * Reads the next line from the buffer and converts to a string array.
 *
 * @return a string array with each comma-separated element as a separate
 *         entry.
 * @throws IOException if bad things happen during the read
 */
public String[] readNext() throws IOException {
  String[] result = null;
  do {
    String nextLine = getNextLine();
    if (!hasNext) {
      return result; // should throw if still pending?
    }
    String[] r = parser.parseLineMulti(nextLine);
    if (r.length > 0) {
      if (result == null) {
        result = r;
      } else {
        String[] t = new String[result.length + r.length];
        System.arraycopy(result, 0, t, 0, result.length);
        System.arraycopy(r, 0, t, result.length, r.length);
        result = t;
      }
    }
  } while (parser.isPending());
  return result;
}

代码示例来源:origin: au.com.bytecode/opencsv

String nextLine = getNextLine();
if (!hasNext) {
  return result; // should throw if still pending?

相关文章