public class CSVFormatter
extends java.util.logging.Formatter
| Constructor and Description |
|---|
CSVFormatter()
Creates a new formatter for CSV.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
escape(java.lang.String string)
Checks whether the designated string contains control characters (field or
record separators) and escapes them if required.
|
protected java.lang.String |
escapedString(java.lang.String string)
Escapes all control characters in the designated string and encloses the
string with the corresponding characters.
|
protected boolean |
escapeRequired(java.lang.String string)
Gets whether the designated string contains control characters (field or
record separators) and therefore needs escaping.
|
java.lang.String |
format(java.util.logging.LogRecord record) |
java.lang.String |
getHead(java.util.logging.Handler h)
Gets the header line containing the names of the fields of a record as
needed for a CSV.
|
public java.lang.String format(java.util.logging.LogRecord record)
format in class java.util.logging.Formatterpublic java.lang.String getHead(java.util.logging.Handler h)
getHead in class java.util.logging.Formatterprotected java.lang.String escape(java.lang.String string)
string - The string to check for required escaping.protected boolean escapeRequired(java.lang.String string)
string - The string to check for required escaping.protected java.lang.String escapedString(java.lang.String string)
string - The string to enclose within the corresponding characters and
to escape the used control characters.