Package org.springframework.batch.item.file.separator

# 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 Object implements RecordSeparatorPolicy
Simplest possible `RecordSeparatorPolicy` - treats all lines as record endings.

Author:
  Dave Syer

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SimpleRecordSeparatorPolicy()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `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 Details

  - ### SimpleRecordSeparatorPolicy

    public SimpleRecordSeparatorPolicy()

- ## Method Details

  - ### 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 a complete 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)`