org.jfree.report.util
public class CSVQuoter extends Object
CSVQuoter is a helper class to encode a string for the CSV file
format.
| Constructor Summary | |
|---|---|
| CSVQuoter()
Creates a new CSVQuoter, which uses a comma as the default separator. | |
| CSVQuoter(char separator)
Creates a new CSVQuoter, which uses the defined separator.
| |
| CSVQuoter(char separator, char quate)
Creates a new CSVQuoter with the given separator and quoting character.
| |
| Method Summary | |
|---|---|
| String | doQuoting(String original)
Encodes the string, so that the string can safely be used in CSV files. |
| char | getQuate()
Returns the quoting character.
|
| char | getSeparator()
Gets the separator used in this quoter and the CSV file.
|
| String | undoQuoting(String nativeString)
Decodes the string, so that all escape sequences get removed. |
CSVQuoter, which uses the defined separator.
Parameters: separator the separator.
Throws: NullPointerException if the given separator is null.
Parameters: separator the separator quate the quoting character
Parameters: original the unquoted string.
Returns: The quoted string
Returns: the quote character.
Returns: the separator (never null).
Parameters: nativeString the quoted string.
Returns: The unquoted string.