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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isEndOfRecord
(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:
isEndOfRecord
in 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:
postProcess
in 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:
preProcess
in interfaceRecordSeparatorPolicy
- Parameters:
line
- the current record.- Returns:
- the line as it should be appended to a record.
- See Also:
-