Class SimpleRecordSeparatorPolicy
java.lang.Object
org.springframework.batch.item.file.separator.SimpleRecordSeparatorPolicy
- All Implemented Interfaces:
RecordSeparatorPolicy
- Direct Known Subclasses:
DefaultRecordSeparatorPolicy,JsonRecordSeparatorPolicy
Simplest possible
RecordSeparatorPolicy - treats all lines as record endings.- Author:
- Dave Syer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisEndOfRecord(String line) Always returns true.postProcess(String record) Pass the record through.preProcess(String line) Pass the line through.
-
Constructor Details
-
SimpleRecordSeparatorPolicy
public SimpleRecordSeparatorPolicy()
-
-
Method Details
-
isEndOfRecord
Always returns true.- Specified by:
isEndOfRecordin interfaceRecordSeparatorPolicy- Parameters:
line- a String without a newline character at the end.- Returns:
- true if this line is a complete record.
- See Also:
-
postProcess
Pass the record through. Do nothing.- Specified by:
postProcessin interfaceRecordSeparatorPolicy- Parameters:
record- the complete record.- Returns:
- a modified version of the record if desired.
- See Also:
-
preProcess
Pass the line through. Do nothing.- Specified by:
preProcessin interfaceRecordSeparatorPolicy- Parameters:
line- the current record.- Returns:
- the line as it should be appended to a record.
- See Also:
-