Class CommonStatsCSVHelper

java.lang.Object
edu.ucsb.cs156.happiercows.helpers.CommonStatsCSVHelper

public class CommonStatsCSVHelper extends Object
  • Method Details

    • toCSV

      public static ByteArrayInputStream toCSV(Iterable<CommonStats> lines) throws IOException
      Convert the given Iterable of CommonStats into a ByteArrayInputStream suitable for CSV export.
      Parameters:
      lines - The Iterable collection of CommonStats to be exported.
      Returns:
      A ByteArrayInputStream representation of the CSV data.
      Throws:
      IOException - if there's an error during CSV generation.