|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.batch.item.file.separator.SimpleRecordSeparatorPolicy org.springframework.batch.item.file.separator.DefaultRecordSeparatorPolicy org.springframework.batch.item.file.separator.SuffixRecordSeparatorPolicy
public class SuffixRecordSeparatorPolicy
A RecordSeparatorPolicy
that looks for an exact match for a String at
the end of a line (e.g. a semicolon).
Field Summary | |
---|---|
static String |
DEFAULT_SUFFIX
Default value for record terminator suffix. |
Constructor Summary | |
---|---|
SuffixRecordSeparatorPolicy()
|
Method Summary | |
---|---|
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. |
Methods inherited from class org.springframework.batch.item.file.separator.DefaultRecordSeparatorPolicy |
---|
preProcess, setContinuation, setQuoteCharacter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_SUFFIX
Constructor Detail |
---|
public SuffixRecordSeparatorPolicy()
Method Detail |
---|
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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |