public class GenericLogReader extends Object implements LogReader
| Modifier and Type | Field and Description |
|---|---|
static String |
DATE_FORMAT1 |
static String |
DATE_FORMAT2 |
static String |
DATE_PATTERN1 |
static String |
DATE_PATTERN2 |
static String |
TIME_PATTERN |
| Constructor and Description |
|---|
GenericLogReader(GenericLogParser parse,
InputStream in) |
GenericLogReader(GenericLogParser parse,
InputStream in,
String dPattern,
String dFormat) |
GenericLogReader(GenericLogParser parse,
Reader r) |
| Modifier and Type | Method and Description |
|---|---|
protected Long |
extractTimestamp(String line) |
String |
getDefault(String key) |
LogMessage |
readNext()
Reads the next LogMessage.
|
void |
setDefault(String key,
String val) |
void |
setDefaults(Map<String,String> defaults)
This sets a number of default properties, which will be given to all messages
created by the implementing reader.
|
public static final String TIME_PATTERN
public static final String DATE_FORMAT1
public static final String DATE_PATTERN1
public static final String DATE_FORMAT2
public static final String DATE_PATTERN2
public GenericLogReader(GenericLogParser parse, Reader r)
public GenericLogReader(GenericLogParser parse, InputStream in)
public GenericLogReader(GenericLogParser parse, InputStream in, String dPattern, String dFormat)
public void setDefaults(Map<String,String> defaults)
LogReadersetDefaults in interface LogReaderpublic LogMessage readNext() throws IOException
LogReadernull if no more messages
can be read.readNext in interface LogReaderIOExceptionLogReader.readNext()Copyright © 2014 jwall.org. All Rights Reserved.