TableWriter

public interface TableWriter extends AutoCloseable

An interface for writing tabular data. A writer should be created for each supported format such as PDF or CSV.

Methods

close

void close()

{@inheritDoc}

writeHeader

void writeHeader(String[] headers)

Writes the table header.

Parameters:
  • headers – an array of headers for the table
Throws:
  • IOException

writeRow

void writeRow(Map<String, String> row, String[] headers)

Writes a row of data to the table.

Parameters:
  • row – the row data, keys are field names and values are their values in string form that should be directly written to the output
  • headers – the array of headers for the table
Throws:
  • IOException