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