public class TsvFormat extends Format
Format, as well as
the escapeChar character for escaping \t, \n, \r and \ in TSV values.
Delimiters are defined as tab characters '\t'Format| Constructor and Description |
|---|
TsvFormat() |
| Modifier and Type | Method and Description |
|---|---|
TsvFormat |
clone() |
protected TreeMap<String,Object> |
getConfiguration() |
char |
getEscapeChar()
Returns the character used for escaping special characters in TSV inputs: \t, \n, \r and \
|
char |
getEscapedTabChar()
Returns the character that should be used to represent an escaped tab, i.e.
|
boolean |
isEscapeChar(char ch)
Identifies whether or not a given character is used for escaping special characters in TSV (\t, \n, \r and \).
|
TsvFormat |
setComment(char comment)
Defines the character that represents a line comment when found in the beginning of a line of text.
|
TsvFormat |
setEscapeChar(char escapeChar)
Defines the character used for escaping special characters in TSV inputs: \t, \n, \r and \ .
|
TsvFormat |
setEscapedTabChar(char escapedTabChar)
Defines the character that should be used to represent an escaped tab, i.e.
|
TsvFormat |
setLineSeparator(char[] lineSeparator)
Defines the line separator sequence that should be used for parsing and writing.
|
TsvFormat |
setLineSeparator(String lineSeparator)
Defines the line separator sequence that should be used for parsing and writing.
|
TsvFormat |
setNormalizedNewline(char normalizedNewline)
Sets the normalized newline character, which is automatically replaced by
Format.getLineSeparator() when reading/writing |
getComment, getLineSeparator, getLineSeparatorString, getNormalizedNewline, getSystemLineSeparator, isComment, isNewLine, toStringpublic TsvFormat setEscapeChar(char escapeChar)
escapeChar - the escape characterTsvFormat instancepublic char getEscapeChar()
public char getEscapedTabChar()
getEscapeChar(). For example, if getEscapeChar() == '\\' and == 'X',
the sequence '\X' will identify a tab.
Defaults to 't'.getEscapeChar() that represents an escaped tab.public TsvFormat setEscapedTabChar(char escapedTabChar)
getEscapeChar(). For example, if getEscapeChar() == '\\' and == 'X',
the sequence '\X' will identify a tab.
Defaults to 't'.escapedTabChar - the character following the getEscapeChar() that represents an escaped tab.TsvFormat instancepublic boolean isEscapeChar(char ch)
ch - the character to be verifiedpublic TsvFormat setLineSeparator(String lineSeparator)
setLineSeparator in class FormatlineSeparator - a sequence of 1 to 2 characters that identifies the end of a lineTsvFormat instancepublic TsvFormat setLineSeparator(char[] lineSeparator)
setLineSeparator in class FormatlineSeparator - a sequence of 1 to 2 characters that identifies the end of a lineTsvFormat instancepublic TsvFormat setNormalizedNewline(char normalizedNewline)
Format.getLineSeparator() when reading/writingsetNormalizedNewline in class FormatnormalizedNewline - a single character used to represent a line separator.TsvFormat instancepublic TsvFormat setComment(char comment)
Use '\0' to disable comment skipping.
setComment in class Formatcomment - the comment characterTsvFormat instanceprotected TreeMap<String,Object> getConfiguration()
getConfiguration in class FormatCopyright © 2024. All rights reserved.