com.univocity.parsers.tsv
Class TsvFormat
java.lang.Object
com.univocity.parsers.common.Format
com.univocity.parsers.tsv.TsvFormat
- All Implemented Interfaces:
- Cloneable
public class TsvFormat
- extends Format
The TSV format configuration, for tab-separated inputs. It offers the options in the default configuration in Format, as well as
the escapeChar character for escaping \t, \n, \r and \ in TSV values.
Delimiters are defined as tab characters '\t'
- Author:
- uniVocity Software Pty Ltd - parsers@univocity.com
- See Also:
Format
|
Method Summary |
TsvFormat |
clone()
|
protected TreeMap<String,Object> |
getConfiguration()
|
char |
getEscapeChar()
Returns the character used for escaping special characters in TSV inputs: \t, \n, \r and \ |
boolean |
isEscapeChar(char ch)
Identifies whether or not a given character is used for escaping special characters in TSV (\t, \n, \r and \). |
void |
setEscapeChar(char escapeChar)
Defines the character used for escaping special characters in TSV inputs: \t, \n, \r and \ . |
| Methods inherited from class com.univocity.parsers.common.Format |
getComment, getLineSeparator, getLineSeparatorString, getNormalizedNewline, getSystemLineSeparator, isComment, isNewLine, setComment, setLineSeparator, setLineSeparator, setNormalizedNewline, toString |
TsvFormat
public TsvFormat()
setEscapeChar
public void setEscapeChar(char escapeChar)
- Defines the character used for escaping special characters in TSV inputs: \t, \n, \r and \ . Defaults to '\\'
- Parameters:
escapeChar - the escape character
getEscapeChar
public char getEscapeChar()
- Returns the character used for escaping special characters in TSV inputs: \t, \n, \r and \
- Returns:
- the escape character.
isEscapeChar
public boolean isEscapeChar(char ch)
- Identifies whether or not a given character is used for escaping special characters in TSV (\t, \n, \r and \).
- Parameters:
ch - the character to be verified
- Returns:
- true if the given character is escape character, false otherwise
getConfiguration
protected TreeMap<String,Object> getConfiguration()
- Specified by:
getConfiguration in class Format
clone
public final TsvFormat clone()
- Overrides:
clone in class Format
Copyright © 2016 uniVocity Software Pty Ltd. All rights reserved.