public interface EventFormat
In addition to a plain parsing method, this class provides some additional methods to allow objects and/or builders to be reused for more efficient data file parsing.
| Modifier and Type | Method and Description |
|---|---|
int |
getHeaderLines()
Get the number of header lines to skip in the file.
|
Object |
newContext()
Create a new context that may speed up parsing.
|
Event |
parse(String line)
Parse a line into an event.
|
Event |
parse(String line,
Object context)
Parse using a context.
|
int getHeaderLines()
Event parse(String line) throws InvalidRowException
line - The line to parse.InvalidRowExceptionObject newContext()
parse(String, Object);
will usually be a builder to be reused.
The context will only ever be used from one thread.
Event parse(String line, Object context) throws InvalidRowException
line - The line to parse.context - The parsing context.InvalidRowException