Package com.kheops.util
Class CSVExporter
java.lang.Object
com.kheops.util.CSVExporter
This class contains methods to create CSV formatted strings.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic chargetPreferredSeparator(String language) Returns the commonly used list separator for the specified language.static inttoCSV(String[] fields, Object[][] values, char separator, OutputStream stream) Deprecated.Use toCSV(String[], Object[][], Locale, OutputStream) insteadstatic inttoCSV(String[] fields, Object[][] values, Locale locale, OutputStream stream) Writes CSV formatted data to the specified stream using the specified fields, values and using the specified separator character.static inttoCSV(String[] fields, Object[][] values, Locale locale, String columnSeparator, OutputStream stream) Writes CSV formatted data to the specified stream using the specified fields, values and using the specified separator character.static inttoCSV(TableModel model, char separator, boolean[] columnFilters, OutputStream stream) Deprecated.static inttoCSV(TableModel model, char separator, OutputStream stream) Deprecated.static inttoCSV(TableModel model, Locale locale, boolean[] columnFilters, OutputStream stream) Writes CSV formatted data to the specified stream using the specified table model and using the specified separator character.static inttoCSV(TableModel model, Locale locale, OutputStream stream) Writes CSV formatted data to the specified stream using the specified table model and using the specified separator character.
- 
Constructor Details- 
CSVExporterpublic CSVExporter()
 
- 
- 
Method Details- 
toCSV@Deprecated public static int toCSV(TableModel model, char separator, OutputStream stream) throws IOException Deprecated.Writes CSV formatted data to the specified stream using the specified table model and using the specified separator character.- Parameters:
- stream- the output stream to write to
- Returns:
- the length of the data
- Throws:
- IOException
- See Also:
 
- 
toCSVWrites CSV formatted data to the specified stream using the specified table model and using the specified separator character.- Parameters:
- stream- the output stream to write to
- Returns:
- the length of the data
- Throws:
- IOException
 
- 
toCSV@Deprecated public static int toCSV(TableModel model, char separator, boolean[] columnFilters, OutputStream stream) throws IOException Deprecated.Writes CSV formatted data to the specified stream using the specified table model and using the specified separator character. If specified column filters is not null, only the columns that have a corresponding value equal to "true" will be included in the CSV.- Parameters:
- stream- the output stream to write to
- Returns:
- the length of the data
- Throws:
- IOException
- See Also:
 
- 
toCSVpublic static int toCSV(TableModel model, Locale locale, boolean[] columnFilters, OutputStream stream) throws IOException Writes CSV formatted data to the specified stream using the specified table model and using the specified separator character. If specified column filters is not null, only the columns that have a corresponding value equal to "true" will be included in the CSV.- Parameters:
- stream- the output stream to write to
- Returns:
- the length of the data
- Throws:
- IOException
 
- 
toCSV@Deprecated public static int toCSV(String[] fields, Object[][] values, char separator, OutputStream stream) throws IOException Deprecated.Use toCSV(String[], Object[][], Locale, OutputStream) insteadWrites CSV formatted data to the specified stream using the specified fields, values and using the specified separator character. If specified column filters is not null, only the columns that have a corresponding value equal to "true" will be included in the CSV.- Parameters:
- stream- the output stream to write to
- Returns:
- the length of the data
- Throws:
- IOException
 
- 
toCSVpublic static int toCSV(String[] fields, Object[][] values, Locale locale, OutputStream stream) throws IOException Writes CSV formatted data to the specified stream using the specified fields, values and using the specified separator character. If specified column filters is not null, only the columns that have a corresponding value equal to "true" will be included in the CSV.- Parameters:
- stream- the output stream to write to
- Returns:
- the length of the data
- Throws:
- IOException
 
- 
toCSVpublic static int toCSV(String[] fields, Object[][] values, Locale locale, String columnSeparator, OutputStream stream) throws IOException Writes CSV formatted data to the specified stream using the specified fields, values and using the specified separator character. If specified column filters is not null, only the columns that have a corresponding value equal to "true" will be included in the CSV.- Parameters:
- stream- the output stream to write to
- Returns:
- the length of the data
- Throws:
- IOException
 
- 
getPreferredSeparatorReturns the commonly used list separator for the specified language.- Parameters:
- language- the language
- Returns:
- the preferred separator character
 
 
-