public final class HeaderAndFooterFilter extends Object implements LineFilter
Instances of this class are immutable and thread-safe.
| Constructor and Description |
|---|
HeaderAndFooterFilter(int headerSize,
boolean hasFooter,
boolean storeFailedLines)
Constructs a new
HeaderAndFooterFilter. |
| Modifier and Type | Method and Description |
|---|---|
FilterResult |
filter(String line,
int lineNumber,
boolean truncated,
boolean lastLine)
Filters the given line.
|
public HeaderAndFooterFilter(int headerSize,
boolean hasFooter,
boolean storeFailedLines)
HeaderAndFooterFilter.headerSize - the size of the header to skip, i. e. number of lineshasFooter - true, if there is a footer to skip; false otherwisestoreFailedLines - true, if the lines which fail the filter should be stored; false otherwisepublic FilterResult filter(String line, int lineNumber, boolean truncated, boolean lastLine)
filter in interface LineFilterline - the content of the linelineNumber - the number of the linetruncated - true, if the given content is incomplete, i. e. truncated at the end; false otherwise.lastLine - true, if it is the last line; false otherwiseCopyright © 2014. All rights reserved.