Class CSVReportUtil
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.modules.output.table.csv.CSVReportUtil
-
public final class CSVReportUtil extends Object
Utility class to provide an easy to use default implementation of CSV table exports.- Author:
- Thomas Morgner
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
createCSV(MasterReport report, OutputStream outputStream, String encoding)
Saves a report to CSV format.static void
createCSV(MasterReport report, OutputStream outputStream, String encoding, ReportProgressListener listener)
Saves a report to CSV format.static void
createCSV(MasterReport report, String filename)
Saves a report to CSV format.static void
createCSV(MasterReport report, String filename, String encoding)
Saves a report to CSV format.
-
-
-
Method Detail
-
createCSV
public static void createCSV(MasterReport report, OutputStream outputStream, String encoding) throws ReportProcessingException, IOException
Saves a report to CSV format.- Parameters:
report
- the report.outputStream
- the output stream.encoding
- the encoding for the output stream (can be null).- Throws:
ReportProcessingException
- if the report processing failed.IOException
- if an IO related error occured.
-
createCSV
public static void createCSV(MasterReport report, OutputStream outputStream, String encoding, ReportProgressListener listener) throws ReportProcessingException, IOException
Saves a report to CSV format.- Parameters:
report
- the report.outputStream
- the output stream.encoding
- the encoding for the output stream (can be null).listener
- listener- Throws:
ReportProcessingException
- if the report processing failed.IOException
- if an IO related error occured.
-
createCSV
public static void createCSV(MasterReport report, String filename) throws ReportProcessingException, IOException
Saves a report to CSV format.- Parameters:
report
- the report.filename
- target file name.- Throws:
ReportProcessingException
- if the report processing failed.IOException
- if there was an IOerror while processing the report.
-
createCSV
public static void createCSV(MasterReport report, String filename, String encoding) throws ReportProcessingException, IOException
Saves a report to CSV format.- Parameters:
report
- the report.filename
- target file name.encoding
- the optional encoding that should be used.- Throws:
ReportProcessingException
- if the report processing failed.IOException
- if there was an IOerror while processing the report.
-
-