public void processRow(List <String> row) { if (previousRow != null) { CsvUtil.writeRow(writer, previousRow, settings.delimiter, settings.escapeChar, settings.charsNeedEscape); writer.Write(streamInformation.getOutputNewline()); } else { writer = new StreamWriter(stream, streamInformation.getOutputEncoding()); } previousRow = row; }
public void endOfFile() { if (previousRow != null) { CsvUtil.writeRow(writer, previousRow, settings.delimiter, settings.escapeChar, settings.charsNeedEscape); if (streamInformation.endsWithNewLine) { writer.Write(streamInformation.getOutputNewline()); } } else { writer = new StreamWriter(stream, streamInformation.getOutputEncoding()); } previousRow = null; writer.Flush(); }
public void writeRow(IEnumerable <String> row) { CsvUtil.writeRow(writer, row, delimiter, escapeChar, charsNeedEscape); writer.WriteLine(); }