|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.snowtide.pdf.util.TableUtils
public class TableUtils
This class provides a set of utility functions related to working with Table
s. At the moment, only
CSV conversion functions are provided.
Method Summary | |
---|---|
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 String s, 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)
Returns a List of Table instances that are available in the given Page . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
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.IOException
convertToCSV(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
String
s, 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.IOException
public static java.util.List getAllTables(Page p)
Table
instances that are available in the given Page
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |