Class CSVFormatter

java.lang.Object
org.jacoco.report.csv.CSVFormatter

public class CSVFormatter extends Object
Report formatter that will create a single CSV file. By default the filename used will be the name of the session.
  • Field Details

    • languageNames

      private ILanguageNames languageNames
    • outputEncoding

      private String outputEncoding
  • Constructor Details

    • CSVFormatter

      public CSVFormatter()
  • Method Details

    • setLanguageNames

      public void setLanguageNames(ILanguageNames languageNames)
      Sets the implementation for language name display. Java language names are defined by default.
      Parameters:
      languageNames - converter for language specific names
    • getLanguageNames

      public ILanguageNames getLanguageNames()
      Returns the language names call-back used in this report.
      Returns:
      language names
    • setOutputEncoding

      public void setOutputEncoding(String outputEncoding)
      Sets the encoding used for generated CSV document. Default is UTF-8.
      Parameters:
      outputEncoding - CSV output encoding
    • createVisitor

      public IReportVisitor createVisitor(OutputStream output) throws IOException
      Creates a new visitor to write a report to the given stream.
      Parameters:
      output - output stream to write the report to
      Returns:
      visitor to emit the report data to
      Throws:
      IOException - in case of problems with the output stream