Package org.kitesdk.morphline.shaded.com.googlecode.jcsv.fastreader

Examples of org.kitesdk.morphline.shaded.com.googlecode.jcsv.fastreader.SimpleCSVTokenizer


      this.ignoreTooLongRecords = new Validator<OnMaxCharactersPerRecord>().validateEnum(
          config,
          getConfigs().getString(config, "onMaxCharactersPerRecord", OnMaxCharactersPerRecord.throwException.toString()),
          OnMaxCharactersPerRecord.class) == OnMaxCharactersPerRecord.ignoreRecord;
      this.tokenizer = quoteChar.length() == 0 ?
          new SimpleCSVTokenizer(separatorChar, trim, addEmptyStrings, columnNames) :
          new QuotedCSVTokenizer(separatorChar, trim, addEmptyStrings, columnNames, maxCharactersPerRecord, ignoreTooLongRecords, quoteChar.charAt(0));         
      validateArguments();
    }
View Full Code Here


    split(Lists.newArrayList(), "", '|', false, false);
    split(Arrays.asList("x"), "x", '|', false, false);
    split(Arrays.asList(null,"x"), "|x", '|', false, false);
   
    Record record = new Record();
    CSVTokenizer tokenizer = new SimpleCSVTokenizer(',', true, true, new ArrayList<String>());
    tokenizer.tokenizeLine(" x ", null, record);
    assertEquals(Arrays.asList("x"), record.get("column0"));
  }
View Full Code Here

    CSVTokenizer tokenizer;
    if (isQuoted) {
      tokenizer = new QuotedCSVTokenizer(separator, false, addEmptyStrings, new ArrayList<String>(), 1000, false, '"');
      tokenizer.tokenizeLine(line, new BufferedReader(new StringReader("")), record);     
    } else {
      tokenizer = new SimpleCSVTokenizer(separator, false, addEmptyStrings, new ArrayList<String>());
      tokenizer.tokenizeLine(line, null, record);
    }
    for (int i = 0; i < expected.size(); i++) {
      assertEquals(expected.get(i), record.getFirstValue("column" + i));
    }
View Full Code Here

TOP

Related Classes of org.kitesdk.morphline.shaded.com.googlecode.jcsv.fastreader.SimpleCSVTokenizer

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.