org.springframework.batch.item.file.separator
Class SimpleRecordSeparatorPolicy

java.lang.Object
  extended by org.springframework.batch.item.file.separator.SimpleRecordSeparatorPolicy
All Implemented Interfaces:
RecordSeparatorPolicy
Direct Known Subclasses:
DefaultRecordSeparatorPolicy

public class SimpleRecordSeparatorPolicy
extends Object
implements RecordSeparatorPolicy

Simplest possible RecordSeparatorPolicy - treats all lines as record endings.

Author:
Dave Syer

Constructor Summary
SimpleRecordSeparatorPolicy()
           
 
Method Summary
 boolean isEndOfRecord(String line)
          Always returns true.
 String postProcess(String record)
          Pass the record through.
 String preProcess(String line)
          Pass the line through.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleRecordSeparatorPolicy

public SimpleRecordSeparatorPolicy()
Method Detail

isEndOfRecord

public boolean isEndOfRecord(String line)
Always returns true.

Specified by:
isEndOfRecord in interface RecordSeparatorPolicy
Parameters:
line - a String without a newline character at the end.
Returns:
true if this line is the end of a record.
See Also:
RecordSeparatorPolicy.isEndOfRecord(java.lang.String)

postProcess

public String postProcess(String record)
Pass the record through. Do nothing.

Specified by:
postProcess in interface RecordSeparatorPolicy
Parameters:
record - the complete record.
Returns:
a modified version of the record if desired.
See Also:
RecordSeparatorPolicy.postProcess(java.lang.String)

preProcess

public String preProcess(String line)
Pass the line through. Do nothing.

Specified by:
preProcess in interface RecordSeparatorPolicy
Parameters:
line - the current record.
Returns:
the line as it should be appended to a record.
See Also:
RecordSeparatorPolicy.preProcess(java.lang.String)


Copyright © 2009 SpringSource. All Rights Reserved.