public class SuffixRecordSeparatorPolicy extends DefaultRecordSeparatorPolicy
RecordSeparatorPolicy
that looks for an exact match for a String at
the end of a line (e.g. a semicolon).Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_SUFFIX
Default value for record terminator suffix.
|
Constructor and Description |
---|
SuffixRecordSeparatorPolicy() |
Modifier and Type | Method and Description |
---|---|
boolean |
isEndOfRecord(String line)
Return true if the line ends with the specified substring.
|
String |
postProcess(String record)
Remove the suffix from the end of the record.
|
void |
setIgnoreWhitespace(boolean ignoreWhitespace)
Flag to indicate that the decision to terminate a record should ignore
whitespace at the end of the line.
|
void |
setSuffix(String suffix)
Lines ending in this terminator String signal the end of a record.
|
preProcess, setContinuation, setQuoteCharacter
public static final String DEFAULT_SUFFIX
public void setSuffix(String suffix)
suffix
- public void setIgnoreWhitespace(boolean ignoreWhitespace)
ignoreWhitespace
- public boolean isEndOfRecord(String line)
isEndOfRecord
in interface RecordSeparatorPolicy
isEndOfRecord
in class DefaultRecordSeparatorPolicy
line
- a String without a newline character at the end.RecordSeparatorPolicy.isEndOfRecord(java.lang.String)
public String postProcess(String record)
postProcess
in interface RecordSeparatorPolicy
postProcess
in class SimpleRecordSeparatorPolicy
record
- the complete record.SimpleRecordSeparatorPolicy.postProcess(java.lang.String)
Copyright © 2014 Pivotal. All rights reserved.