Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
 public void writeRow(IEnumerable <String> row)
 {
     CsvUtil.writeRow(writer, row, delimiter, escapeChar, charsNeedEscape);
     writer.WriteLine();
 }