com.univocity.api.entity.text.tsv
Class TsvFormat

java.lang.Object
  extended by com.univocity.api.entity.Configuration
      extended by com.univocity.api.entity.text.TextFormat
          extended by com.univocity.api.entity.text.tsv.TsvFormat

public final class TsvFormat
extends TextFormat

The TSV format configuration class. Used by TSV data entities in TsvEntityConfiguration.

It provides the following configuration options (in addition to the ones in TextFormat):

Author:
uniVocity Software Pty Ltd - dev@univocity.com
See Also:
TsvEntityConfiguration, TextFormat

Constructor Summary
TsvFormat()
           
 
Method Summary
protected  void copyDefaultsFrom(Configuration defaultConfig)
          Applies default values to undefined settings using a Configuration object.
 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 inputs: \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.api.entity.text.TextFormat
getComment, getLineSeparator, getLineSeparatorString, getNormalizedNewline, isComment, isLineSeparator, isLineSeparator, isNormalizedNewLine, setComment, setLineSeparator, setLineSeparator, setNormalizedNewline
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TsvFormat

public TsvFormat()
Method Detail

getEscapeChar

public final char getEscapeChar()
Returns the character used for escaping special characters in TSV inputs: \t, \n, \r and \ . Defaults to '\\'

e.g. the value "\\n" " is parsed as the newline character '\n')

Defaults to to '\\'

Returns:
the escape character for special sequences in TSV values

setEscapeChar

public final void setEscapeChar(char escapeChar)
Defines the character used for escaping special characters in TSV inputs: \t, \n, \r and \ . Defaults to '\\'

e.g. the value "\\n" " is parsed as the newline character '\n')

Parameters:
escapeChar - the escape character

isEscapeChar

public final boolean isEscapeChar(char ch)
Identifies whether or not a given character is used for escaping special characters in TSV inputs: \t, \n, \r and \

Parameters:
ch - the character to be verified
Returns:
true if the given character is the character used for escaping \t, \n, \r and \ , otherwise false

copyDefaultsFrom

protected final void copyDefaultsFrom(Configuration defaultConfig)
Applies default values to undefined settings using a Configuration object.

Overrides:
copyDefaultsFrom in class TextFormat
Parameters:
defaultConfig - a configuration object from where to obtain default settings.


Copyright © 2015 uniVocity Software Pty Ltd. All rights reserved.