|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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(java.lang.String quoteCharacter)
Convenient constructor with quote character as parameter. |
|
DefaultRecordSeparatorPolicy(java.lang.String quoteCharacter,
java.lang.String continuation)
Convenient constructor with quote character and continuation marker as parameters. |
|
| Method Summary | |
|---|---|
boolean |
isEndOfRecord(java.lang.String line)
Return true if the line does not have unterminated quotes (delimited by "), and does not end with a continuation marker ('\'). |
java.lang.String |
preProcess(java.lang.String line)
If we are in an unterminated quote, add a line separator. |
void |
setContinuation(java.lang.String continuation)
Public setter for the continuation. |
void |
setQuoteCharacter(java.lang.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(java.lang.String quoteCharacter)
public DefaultRecordSeparatorPolicy(java.lang.String quoteCharacter,
java.lang.String continuation)
| Method Detail |
|---|
public void setQuoteCharacter(java.lang.String quoteCharacter)
quoteCharacter - the quoteCharacter to setpublic void setContinuation(java.lang.String continuation)
continuation - the continuation to setpublic boolean isEndOfRecord(java.lang.String line)
isEndOfRecord in interface RecordSeparatorPolicyisEndOfRecord in class SimpleRecordSeparatorPolicyline - a String without a newline character at the end.
RecordSeparatorPolicy.isEndOfRecord(java.lang.String)public java.lang.String preProcess(java.lang.String line)
preProcess in interface RecordSeparatorPolicypreProcess in class SimpleRecordSeparatorPolicyline - the current record.
SimpleRecordSeparatorPolicy.preProcess(java.lang.String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||