|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sibvisions.rad.model.DataBookCSVExporter
public final class DataBookCSVExporter
The DataBookUtil handles simple access to databooks. It allows export/import of
data.
| Method Summary | |
|---|---|
static String |
formatCSVFileName(String pName)
Formats a name as filename for a csv export. |
static String |
getDefaultEncoding()
Get the default encoding for CSV exports. |
static void |
setDefaultEncoding(String pEncoding)
Sets the default encoding for CSV exports. |
static void |
writeCSV(IDataBook pBook,
OutputStream pStream)
Writes all rows and values of a databook, as comma separated values to a stream. |
static void |
writeCSV(IDataBook pBook,
OutputStream pStream,
String pEncoding)
Writes all rows and values of a databook, as comma separated values to a stream. |
static void |
writeCSV(IDataBook pBook,
OutputStream pStream,
String[] pColumnNames,
String[] pLabels,
ICondition pFilter,
SortDefinition pSort)
Writes all rows and values of a databook, as comma separated values to a stream. |
static void |
writeCSV(IDataBook pBook,
OutputStream pStream,
String[] pColumnNames,
String[] pLabels,
ICondition pFilter,
SortDefinition pSort,
String pSeparator)
Writes all rows and values of a databook, as comma separated values to a stream. |
static void |
writeCSV(IDataBook pBook,
OutputStream pStream,
String[] pColumnNames,
String[] pLabels,
ICondition pFilter,
SortDefinition pSort,
String pSeparator,
String pEncoding)
Writes all rows and values of a databook, as comma separated values to a stream. |
static void |
writeQuoted(OutputStreamWriter pStream,
IDataType pDataType,
Object pValue,
String pSeparator)
Writes an object as quoted string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void writeCSV(IDataBook pBook,
OutputStream pStream)
throws ModelException,
IOException
pBook - the databookpStream - the output stream
ModelException - if the access to rows or values of the databook fails
IOException - if an error occurs during writing
public static void writeCSV(IDataBook pBook,
OutputStream pStream,
String pEncoding)
throws ModelException,
IOException
pBook - the databookpStream - the output streampEncoding - the character encoding
ModelException - if the access to rows or values of the databook fails
IOException - if an error occurs during writing
public static void writeCSV(IDataBook pBook,
OutputStream pStream,
String[] pColumnNames,
String[] pLabels,
ICondition pFilter,
SortDefinition pSort)
throws ModelException,
IOException
pBook - the databookpStream - the output streampColumnNames - specific column names or null to use the
column names from the current ColumnViewpLabels - the preferred column labelspFilter - the export filterpSort - the export sort definition
ModelException - if the access to rows or values of the databook fails
IOException - if an error occurs during writing
public static void writeCSV(IDataBook pBook,
OutputStream pStream,
String[] pColumnNames,
String[] pLabels,
ICondition pFilter,
SortDefinition pSort,
String pSeparator)
throws ModelException,
IOException
pBook - the databookpStream - the output streampColumnNames - specific column names or null to use the column names
from the current ColumnViewpLabels - the preferred column labelspFilter - the export filterpSort - the export sort definitionpSeparator - the list separator
ModelException - if the access to rows or values of the databook fails
IOException - if an error occurs during writing
public static void writeCSV(IDataBook pBook,
OutputStream pStream,
String[] pColumnNames,
String[] pLabels,
ICondition pFilter,
SortDefinition pSort,
String pSeparator,
String pEncoding)
throws ModelException,
IOException
pBook - the databookpStream - the output streampColumnNames - specific column names or null to use the column names
from the current ColumnViewpLabels - the preferred column labelspFilter - the export filterpSort - the export sort definitionpSeparator - the list separatorpEncoding - the character encoding
ModelException - if the access to rows or values of the databook fails
IOException - if an error occurs during writingpublic static String formatCSVFileName(String pName)
pName - a databook name or filename. Predefined extensions will be re-used.
pName is null then
Export.csv is used.
public static void writeQuoted(OutputStreamWriter pStream,
IDataType pDataType,
Object pValue,
String pSeparator)
throws IOException
pStream - the output streampDataType - the datatype for the given valuepValue - the valuepSeparator - the column separator
IOException - if a write error occurspublic static void setDefaultEncoding(String pEncoding)
pEncoding - the encodingpublic static String getDefaultEncoding()
Charset.defaultCharset()
acts as fallback.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||