public class DelimitedLineTokenizer extends AbstractLineTokenizer
LineTokenizer implementation that splits the input String on a
 configurable delimiter. This implementation also supports the use of an
 escape character to escape delimiters and line endings.| Modifier and Type | Field and Description | 
|---|---|
| static char | DEFAULT_QUOTE_CHARACTERConvenient constant for the common case of a " character used to escape
 delimiters or line endings. | 
| static String | DELIMITER_COMMAConvenient constant for the common case of a comma delimiter. | 
| static String | DELIMITER_TABConvenient constant for the common case of a tab delimiter. | 
names| Constructor and Description | 
|---|
| DelimitedLineTokenizer()Create a new instance of the  DelimitedLineTokenizerclass for the
 common case where the delimiter is acomma. | 
| DelimitedLineTokenizer(String delimiter)Create a new instance of the  DelimitedLineTokenizerclass. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected List<String> | doTokenize(String line)Yields the tokens resulting from the splitting of the supplied
  line. | 
| protected boolean | isQuoteCharacter(char c)Is the supplied character a quote character? | 
| void | setDelimiter(String delimiter)Setter for the delimiter character. | 
| void | setIncludedFields(int[] includedFields)The fields to include in the output by position (starting at 0). | 
| void | setQuoteCharacter(char quoteCharacter)Public setter for the quoteCharacter. | 
hasNames, isStrict, setFieldSetFactory, setNames, setStrict, tokenizepublic static final String DELIMITER_TAB
public static final String DELIMITER_COMMA
public static final char DEFAULT_QUOTE_CHARACTER
public DelimitedLineTokenizer()
DelimitedLineTokenizer class for the
 common case where the delimiter is a comma.public DelimitedLineTokenizer(String delimiter)
DelimitedLineTokenizer class.delimiter - the desired delimiterpublic void setDelimiter(String delimiter)
delimiter - public void setIncludedFields(int[] includedFields)
includedFields - the included fields to setpublic void setQuoteCharacter(char quoteCharacter)
quoteCharacter - the quoteCharacter to setDEFAULT_QUOTE_CHARACTERprotected List<String> doTokenize(String line)
line.doTokenize in class AbstractLineTokenizerline - the line to be tokenizedprotected boolean isQuoteCharacter(char c)
c - the character to be checkedtrue if the supplied character is an quote charactersetQuoteCharacter(char)Copyright © 2014 Pivotal. All rights reserved.