Class FileXPorter

java.lang.Object
clazzfish.monitor.spi.FileXPorter
All Implemented Interfaces:
CsvXPorter

public class FileXPorter extends Object implements CsvXPorter
The class FileXPorter accepts a file URI to import and export CSV data.
Since:
2.5 (18.02.25)
Author:
oboehm
  • Constructor Details

    • FileXPorter

      public FileXPorter()
  • Method Details

    • exportCSV

      public void exportCSV(URI uri, String csvHeadLine, List<String> csvLines) throws IOException
      Description copied from interface: CsvXPorter
      Interface for exporting CSV.
      Specified by:
      exportCSV in interface CsvXPorter
      Parameters:
      uri - URI wher the CSV should be exported to
      csvHeadLine - CSV header
      csvLines - CSV lines
      Throws:
      IOException - in case of I/O problems
    • importCSV

      public List<String> importCSV(URI uri) throws IOException
      Description copied from interface: CsvXPorter
      Interface for importing a CSV. This method should be called in CsvXPorter.exportCSV(URI, String, List) to aggregate the count of the actual export with former exports.
      Specified by:
      importCSV in interface CsvXPorter
      Parameters:
      uri - URI where the CSV should be imported from
      Returns:
      list of CSV lines (including head line)
      Throws:
      IOException - in case of I/O problems