-
- All Known Implementing Classes:
SimpleLineReader
public interface LineReader
When theUnmarshallerreads a text file, it reads it via a LineReader.
Unless specified, the default implementation will be used,SimpleLineReader, which will read each line and pass it to theUnmarshaller
Sometimes, text files contains lines you're not interested to, or you want to do some preprocessing before parsing them: in such cases, it's useful to provide your own implementation of LineReader- See Also:
SimpleLineReader
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringreadLine(Reader reader, Padder defaultPadder, String propertyDelimiter, int recordLength, String lineSeparator)Reads a line from a Reader.
-
-
-
Method Detail
-
readLine
String readLine(Reader reader, Padder defaultPadder, String propertyDelimiter, int recordLength, String lineSeparator)
Reads a line from a Reader. This is where you want to add your customization- Parameters:
reader- a reader, reading from a fixed-length filedefaultPadder- the padder to optionally use when reading a linepropertyDelimiter- the delimiter used to delimit properties on a linerecordLength- the total expected length of a linelineSeparator- the character sequence used to mark the end of a line- Returns:
- a string, or null if there are no more lines to read
-
-