|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.pentaho.reporting.engine.classic.core.modules.misc.tablemodel.CSVTableModelProducer
public class CSVTableModelProducer
Creates a TableModel using a file formated in CSV for input. The separation can be what ever you want
(as it is an understandable regexp). The default separator is a ,.
| Constructor Summary | |
|---|---|
CSVTableModelProducer(BufferedReader r)
|
|
CSVTableModelProducer(InputStream in)
|
|
CSVTableModelProducer(InputStream in,
String encoding)
|
|
CSVTableModelProducer(String filename)
|
|
| Method Summary | |
|---|---|
void |
close()
|
String |
getSeparator()
Returns the current separator used to parse the input. |
TableModel |
getTableModel()
Creates the corrspondant TableModel of the input. |
boolean |
isColumnNameFirstLine()
Tells if the first line of the input was column names. |
TableModel |
parse()
Parses the input and stores data in a TableModel. |
void |
setColumnNameFirstLine(boolean columnNameFirst)
Set if the first line of the input is column names or not. |
void |
setSeparator(String separator)
Sets the separator for parsing the input. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CSVTableModelProducer(InputStream in)
public CSVTableModelProducer(InputStream in,
String encoding)
throws UnsupportedEncodingException
UnsupportedEncodingException
public CSVTableModelProducer(String filename)
throws FileNotFoundException
FileNotFoundExceptionpublic CSVTableModelProducer(BufferedReader r)
| Method Detail |
|---|
public void close()
throws IOException
IOException
public TableModel parse()
throws IOException
IOExceptionthis.getTableModel()public String getSeparator()
public void setSeparator(String separator)
String.split().
The default separator is a ;.
separator - a regexp
public TableModel getTableModel()
throws IOException
IOExceptionpublic boolean isColumnNameFirstLine()
public void setColumnNameFirstLine(boolean columnNameFirst)
columnNameFirst - boolean
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||