|
||||||||||
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
public class DefaultRecordSeparatorPolicy
A RecordSeparatorPolicy
that treats all lines as record endings, as
long as they do not have unterminated quotes, and do not end in a
continuation marker.
Constructor Summary | |
---|---|
DefaultRecordSeparatorPolicy()
Default constructor. |
|
DefaultRecordSeparatorPolicy(String quoteCharacter)
Convenient constructor with quote character as parameter. |
|
DefaultRecordSeparatorPolicy(String quoteCharacter,
String continuation)
Convenient constructor with quote character and continuation marker as parameters. |
Method Summary | |
---|---|
boolean |
isEndOfRecord(String line)
Return true if the line does not have unterminated quotes (delimited by "), and does not end with a continuation marker ('\'). |
String |
preProcess(String line)
If we are in an unterminated quote, add a line separator. |
void |
setContinuation(String continuation)
Public setter for the continuation. |
void |
setQuoteCharacter(String quoteCharacter)
Public setter for the quoteCharacter. |
Methods inherited from class org.springframework.batch.item.file.separator.SimpleRecordSeparatorPolicy |
---|
postProcess |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultRecordSeparatorPolicy()
public DefaultRecordSeparatorPolicy(String quoteCharacter)
public DefaultRecordSeparatorPolicy(String quoteCharacter, String continuation)
Method Detail |
---|
public void setQuoteCharacter(String quoteCharacter)
quoteCharacter
- the quoteCharacter to setpublic void setContinuation(String continuation)
continuation
- the continuation to setpublic boolean isEndOfRecord(String line)
isEndOfRecord
in interface RecordSeparatorPolicy
isEndOfRecord
in class SimpleRecordSeparatorPolicy
line
- a String without a newline character at the end.
RecordSeparatorPolicy.isEndOfRecord(java.lang.String)
public String preProcess(String line)
preProcess
in interface RecordSeparatorPolicy
preProcess
in class SimpleRecordSeparatorPolicy
line
- the current record.
SimpleRecordSeparatorPolicy.preProcess(java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |