Class SimpleRecordSeparatorPolicy
- java.lang.Object
- org.springframework.batch.item.file.separator.SimpleRecordSeparatorPolicy
- All Implemented Interfaces:
RecordSeparatorPolicy
- Direct Known Subclasses:
DefaultRecordSeparatorPolicy
,JsonRecordSeparatorPolicy
public class SimpleRecordSeparatorPolicy extends java.lang.Object implements RecordSeparatorPolicy
Simplest possibleRecordSeparatorPolicy
- treats all lines as record endings.- Author:
- Dave Syer
Constructor Summary
Constructors Constructor Description SimpleRecordSeparatorPolicy()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isEndOfRecord(java.lang.String line)
Always returns true.java.lang.String
postProcess(java.lang.String record)
Pass the record through.java.lang.String
preProcess(java.lang.String line)
Pass the line through.
Method Detail
isEndOfRecord
public boolean isEndOfRecord(java.lang.String line)
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:
RecordSeparatorPolicy.isEndOfRecord(java.lang.String)
postProcess
public java.lang.String postProcess(java.lang.String record)
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:
RecordSeparatorPolicy.postProcess(java.lang.String)
preProcess
public java.lang.String preProcess(java.lang.String line)
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:
RecordSeparatorPolicy.preProcess(java.lang.String)