Class CsvWriter


public class CsvWriter extends AbstractWriter<CsvWriterSettings>
A powerful and flexible CSV writer implementation.
Author:
Univocity Software Pty Ltd - parsers@univocity.com
See Also:
  • Constructor Details

    • CsvWriter

      public CsvWriter(CsvWriterSettings settings)
      The CsvWriter supports all settings provided by CsvWriterSettings, and requires this configuration to be properly initialized.

      Important: by not providing an instance of Writer to this constructor, only the operations that write to Strings are available.

      Parameters:
      settings - the CSV writer configuration
    • CsvWriter

      public CsvWriter(Writer writer, CsvWriterSettings settings)
      The CsvWriter supports all settings provided by CsvWriterSettings, and requires this configuration to be properly initialized.
      Parameters:
      writer - the output resource that will receive CSV records produced by this class.
      settings - the CSV writer configuration
    • CsvWriter

      public CsvWriter(File file, CsvWriterSettings settings)
      The CsvWriter supports all settings provided by CsvWriterSettings, and requires this configuration to be properly initialized.
      Parameters:
      file - the output file that will receive CSV records produced by this class.
      settings - the CSV writer configuration
    • CsvWriter

      public CsvWriter(File file, String encoding, CsvWriterSettings settings)
      The CsvWriter supports all settings provided by CsvWriterSettings, and requires this configuration to be properly initialized.
      Parameters:
      file - the output file that will receive CSV records produced by this class.
      encoding - the encoding of the file
      settings - the CSV writer configuration
    • CsvWriter

      public CsvWriter(File file, Charset encoding, CsvWriterSettings settings)
      The CsvWriter supports all settings provided by CsvWriterSettings, and requires this configuration to be properly initialized.
      Parameters:
      file - the output file that will receive CSV records produced by this class.
      encoding - the encoding of the file
      settings - the CSV writer configuration
    • CsvWriter

      public CsvWriter(OutputStream output, CsvWriterSettings settings)
      The CsvWriter supports all settings provided by CsvWriterSettings, and requires this configuration to be properly initialized.
      Parameters:
      output - the output stream that will be written with the CSV records produced by this class.
      settings - the CSV writer configuration
    • CsvWriter

      public CsvWriter(OutputStream output, String encoding, CsvWriterSettings settings)
      The CsvWriter supports all settings provided by CsvWriterSettings, and requires this configuration to be properly initialized.
      Parameters:
      output - the output stream that will be written with the CSV records produced by this class.
      encoding - the encoding of the stream
      settings - the CSV writer configuration
    • CsvWriter

      public CsvWriter(OutputStream output, Charset encoding, CsvWriterSettings settings)
      The CsvWriter supports all settings provided by CsvWriterSettings, and requires this configuration to be properly initialized.
      Parameters:
      output - the output stream that will be written with the CSV records produced by this class.
      encoding - the encoding of the stream
      settings - the CSV writer configuration
  • Method Details