public class TableUtils
extends java.lang.Object
Tables. At the moment, only
CSV conversion functions are provided.| Modifier and Type | Method and Description |
|---|---|
static java.lang.String[] |
convertTablesToCSV(Page p,
char delim)
Calls
convertTablesToCSV(Page, char, String) with the specified page, cell delimiter, and
a single linefeed (\n) as a linebreak sequence. |
static java.lang.String[] |
convertTablesToCSV(Page p,
char delim,
java.lang.String linebreak)
Returns an array of CSV-formatted
Strings, one for each Table found in the given
page, using the specified character as a cell delimiter and the specified String as a linebreak sequence. |
static java.lang.String |
convertToCSV(Table table,
char delim)
Calls
convertToCSV(Table, char, String) with the specified Table, cell delimiter,
and a single linefeed (\n) as a linebreak sequence. |
static java.lang.String |
convertToCSV(Table table,
char delim,
java.lang.String linebreak)
Returns a CSV-formatted String based on the contents of the given
Table, using
the specified character as a cell delimiter and the specified String as a linebreak
sequence. |
static java.util.List |
getAllTables(Page p)
|
public static java.lang.String convertToCSV(Table table, char delim) throws java.io.IOException
convertToCSV(Table, char, String) with the specified Table, cell delimiter,
and a single linefeed (\n) as a linebreak sequence.java.io.IOExceptionconvertToCSV(Table, char, String)public static java.lang.String convertToCSV(Table table, char delim, java.lang.String linebreak) throws java.io.IOException
Table, using
the specified character as a cell delimiter and the specified String as a linebreak
sequence.java.io.IOException - if an error occurs generating the CSV conversionpublic static java.lang.String[] convertTablesToCSV(Page p, char delim, java.lang.String linebreak) throws java.io.IOException
Strings, one for each Table found in the given
page, using the specified character as a cell delimiter and the specified String as a linebreak sequence.
This is simply a shortcut to applying convertToCSV(Table, char, String) to each Table
in the given Page manually.java.io.IOException - if an error occurs generating the CSV conversionconvertToCSV(Table, char, String)public static java.lang.String[] convertTablesToCSV(Page p, char delim) throws java.io.IOException
convertTablesToCSV(Page, char, String) with the specified page, cell delimiter, and
a single linefeed (\n) as a linebreak sequence.java.io.IOExceptionpublic static java.util.List getAllTables(Page p)