Class PassThroughLineMapper
- java.lang.Object
- org.springframework.batch.item.file.mapping.PassThroughLineMapper
- All Implemented Interfaces:
LineMapper<java.lang.String>
public class PassThroughLineMapper extends java.lang.Object implements LineMapper<java.lang.String>
Pass throughLineMapper
useful for passing the originalString
back directly rather than a mapped object.
Constructor Summary
Constructors Constructor Description PassThroughLineMapper()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
mapLine(java.lang.String line, int lineNumber)
Implementations must implement this method to map the provided line to the parameter type T.
Method Detail
mapLine
public java.lang.String mapLine(java.lang.String line, int lineNumber) throws java.lang.Exception
Description copied from interface:LineMapper
Implementations must implement this method to map the provided line to the parameter type T. The line number represents the number of lines into a file the current line resides.- Specified by:
mapLine
in interfaceLineMapper<java.lang.String>
- Parameters:
line
- to be mappedlineNumber
- of the current line- Returns:
- mapped object of type T
- Throws:
java.lang.Exception
- if error occurred while parsing.