Package org.dbcooper.io

Examples of org.dbcooper.io.CsvReader


   * @param csvParser The parser to use to interpret delimited data.
   * @param tableName The name to give to this table.
   * @param inputStreamSource The resource to obtain data from.
   */
  public CsvTable(CsvParser csvParser, String tableName, InputStreamSource inputStreamSource) {
    new CsvReader(csvParser).readLines(
      new InputStreamReaderSource(inputStreamSource),
      new HeaderCallback(tableName),
      new DataCallback()
    );
  }
View Full Code Here


    return result;
  }

  public static DefaultTable csvTable(String name, String csvData) {
    CsvTableBuilder builder = new CsvTableBuilder();
    new CsvReader().readLines(new StringReaderSource(csvData), builder, builder);
    return stringsTable(name, builder.getCols(), builder.getRows());
  }
View Full Code Here

TOP

Related Classes of org.dbcooper.io.CsvReader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.