Search in sources :

Example 1 with SimpleReader

use of org.skife.csv.SimpleReader in project tdi-studio-se by Talend.

the class MultiSchemasManager method getCsvReader.

private CSVReader getCsvReader(ByteArrayInputStream inputStream, char separator, String encoding) throws FileNotFoundException, UnsupportedEncodingException {
    encoding = TalendTextUtils.removeQuotes(encoding);
    // CSVReader csvReader = new CSVReader(new BufferedReader(new InputStreamReader(inputStream, encoding == null ?
    // ENCODING
    // : encoding)), separator);
    // csvReader.setRecordDelimiter('\n');
    // csvReader.setSkipEmptyRecords(true);
    // csvReader.setTextQualifier('"');
    //
    // csvReader.setEscapeMode(com.csvreader.CsvReader.ESCAPE_MODE_DOUBLED);
    CSVReader csvReader = new SimpleReader();
    csvReader.setSeperator(separator);
    return csvReader;
}
Also used : CSVReader(org.skife.csv.CSVReader) SimpleReader(org.skife.csv.SimpleReader)

Example 2 with SimpleReader

use of org.skife.csv.SimpleReader in project tdi-studio-se by Talend.

the class MultiSchemasManager method getCSVReader.

private CSVReader getCSVReader(final String filePath, final String encoding, final String fieldSeparator, final String rowSeparator, final boolean needSkpipEmptyRecord) throws IOException {
    CSVReader csvReadertFileInputDelimited = new SimpleReader();
    csvReadertFileInputDelimited.setSeperator(fieldSeparator.charAt(0));
    return csvReadertFileInputDelimited;
}
Also used : CSVReader(org.skife.csv.CSVReader) SimpleReader(org.skife.csv.SimpleReader)

Aggregations

CSVReader (org.skife.csv.CSVReader)2 SimpleReader (org.skife.csv.SimpleReader)2