| Modifier and Type | Field and Description |
|---|---|
| public static final char | DEFAULT_ESCAPE_CHARACTER
The character used for escaping quotes. |
| public static final String | DEFAULT_LINE_END
Default line terminator. |
| public static final char | DEFAULT_QUOTE_CHARACTER
The default quote character to use if none is supplied to the constructor. |
| public static final char | DEFAULT_SEPARATOR
The default separator to use if none is supplied to the constructor. |
| public static final int | INITIAL_STRING_SIZE
Default buffer sizes |
| public static final char | NO_ESCAPE_CHARACTER
The escape constant to use when you wish to suppress all escaping. |
| public static final char | NO_QUOTE_CHARACTER
The quote constant to use when you wish to suppress all quoting. |
| public static final String | RFC4180_LINE_END
RFC 4180 compliant line terminator. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: True if the print stream has encountered an error either on the underlying output stream or during a format conversion.Flushes the buffer and checks to see if the there has been an error in the printstream. |
| public default void | |
| public IOException | Returns: the latest IOException encountered in the print stream either on the underlying output stream or during a format conversion.Get latest exception. |
| public void | resetError()
Set the error back to null to be able to check for the next error
using |
| public void | |
| public void | writeAll(Iterable<String[]>
an Iterable of String[], with each String[] representing a line of
the file. allLines, boolean true if all values are to be quoted. false if quotes only
to be applied to values which contain the separator, escape,
quote or new line characters. applyQuotesToAll)Writes iterable to a CSV file. |
| public default void | writeAll(List<String[]>
A List of String[] with each String[] representing a line of
the file. allLines, boolean True if all values are to be quoted. False if quotes only
to be applied to values which contain the separator, escape,
quote, or new line characters. applyQuotesToAll)Writes the entire list to a CSV file. |
| public default void | |
| public default void | |
| public default int | |
| public default int | |
| public int | Returns: Number of lines written - including header.The Result set to write. rs, boolean Include the column names in the output. includeColumnNames, boolean Remove spaces from the data before writing. trim, boolean Whether all values should be quoted. applyQuotesToAll)Writes the entire ResultSet to a CSV file. |
| public void | |
| public default void |
| DEFAULT_ESCAPE_CHARACTER | back to summary |
|---|---|
| public static final char DEFAULT_ESCAPE_CHARACTER The character used for escaping quotes. | |
| DEFAULT_LINE_END | back to summary |
|---|---|
| public static final String DEFAULT_LINE_END Default line terminator. | |
| DEFAULT_QUOTE_CHARACTER | back to summary |
|---|---|
| public static final char DEFAULT_QUOTE_CHARACTER The default quote character to use if none is supplied to the constructor. | |
| DEFAULT_SEPARATOR | back to summary |
|---|---|
| public static final char DEFAULT_SEPARATOR The default separator to use if none is supplied to the constructor. | |
| INITIAL_STRING_SIZE | back to summary |
|---|---|
| public static final int INITIAL_STRING_SIZE Default buffer sizes | |
| NO_ESCAPE_CHARACTER | back to summary |
|---|---|
| public static final char NO_ESCAPE_CHARACTER The escape constant to use when you wish to suppress all escaping. | |
| NO_QUOTE_CHARACTER | back to summary |
|---|---|
| public static final char NO_QUOTE_CHARACTER The quote constant to use when you wish to suppress all quoting. | |
| RFC4180_LINE_END | back to summary |
|---|---|
| public static final String RFC4180_LINE_END RFC 4180 compliant line terminator. | |
| checkError | back to summary |
|---|---|
| public boolean checkError() Flushes the buffer and checks to see if the there has been an error in the printstream.
| |
| flushQuietly | back to summary |
|---|---|
| public default void flushQuietly() Flushes the writer without throwing any exceptions. | |
| getException | back to summary |
|---|---|
| public IOException getException() Get latest exception. Note This does not return exception which are caught by underlying writer (PrintWriter) or stream. If you are using this method then consider using a Writer class that throws exceptions.
| |
| resetError | back to summary |
|---|---|
| public void resetError() Set the error back to null to be able to check for the next error
using | |
| setResultService | back to summary |
|---|---|
| public void setResultService(ResultSetHelper resultService) Sets the result service.
| |
| writeAll | back to summary |
|---|---|
| public void writeAll(Iterable<String[]> allLines, boolean applyQuotesToAll) Writes iterable to a CSV file. The list is assumed to be a String[] | |
| writeAll | back to summary |
|---|---|
| public default void writeAll(List<String[]> allLines, boolean applyQuotesToAll) Writes the entire list to a CSV file. The list is assumed to be a String[]. | |
| writeAll | back to summary |
|---|---|
| public default void writeAll(Iterable<String[]> allLines) Writes iterable to a CSV file. The list is assumed to be a String[] | |
| writeAll | back to summary |
|---|---|
| public default void writeAll(List<String[]> allLines) Writes the entire list to a CSV file. The list is assumed to be a String[]. | |
| writeAll | back to summary |
|---|---|
| public default int writeAll(ResultSet rs, boolean includeColumnNames) throws SQLException, IOException Writes the entire ResultSet to a CSV file. The caller is responsible for closing the ResultSet. Values are not trimmed. Quotes are applied to all values in the output.
| |
| writeAll | back to summary |
|---|---|
| public default int writeAll(ResultSet rs, boolean includeColumnNames, boolean trim) throws SQLException, IOException Writes the entire ResultSet to a CSV file. The caller is responsible for closing the ResultSet. Quotes are applied to all values in the output.
| |
| writeAll | back to summary |
|---|---|
| public int writeAll(ResultSet rs, boolean includeColumnNames, boolean trim, boolean applyQuotesToAll) throws SQLException, IOException Writes the entire ResultSet to a CSV file. The caller is responsible for closing the ResultSet.
| |
| writeNext | back to summary |
|---|---|
| public void writeNext(String[] nextLine, boolean applyQuotesToAll) Writes the next line to the file.
| |
| writeNext | back to summary |
|---|---|
| public default void writeNext(String[] nextLine) Writes the next line to the file.
| |