org.jwall.log.io
Class GenericLogReader

java.lang.Object
  extended by org.jwall.log.io.GenericLogReader
All Implemented Interfaces:
LogReader
Direct Known Subclasses:
AccessLogReader, ErrorLogReader

public class GenericLogReader
extends Object
implements LogReader


Field Summary
static String DATE_FORMAT1
           
static String DATE_FORMAT2
           
static String DATE_PATTERN1
           
static String DATE_PATTERN2
           
static String TIME_PATTERN
           
 
Constructor Summary
GenericLogReader(GenericLogParser parse, InputStream in)
           
GenericLogReader(GenericLogParser parse, InputStream in, String dPattern, String dFormat)
           
GenericLogReader(GenericLogParser parse, Reader r)
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TIME_PATTERN

public static final String TIME_PATTERN
See Also:
Constant Field Values

DATE_FORMAT1

public static final String DATE_FORMAT1
See Also:
Constant Field Values

DATE_PATTERN1

public static final String DATE_PATTERN1
See Also:
Constant Field Values

DATE_FORMAT2

public static final String DATE_FORMAT2
See Also:
Constant Field Values

DATE_PATTERN2

public static final String DATE_PATTERN2
See Also:
Constant Field Values
Constructor Detail

GenericLogReader

public GenericLogReader(GenericLogParser parse,
                        Reader r)

GenericLogReader

public GenericLogReader(GenericLogParser parse,
                        InputStream in)

GenericLogReader

public GenericLogReader(GenericLogParser parse,
                        InputStream in,
                        String dPattern,
                        String dFormat)
Method Detail

setDefaults

public void setDefaults(Map<String,String> defaults)
Description copied from interface: LogReader
This sets a number of default properties, which will be given to all messages created by the implementing reader. The defaults may be overwritten by more message-specific values during parsing.

Specified by:
setDefaults in interface LogReader

setDefault

public void setDefault(String key,
                       String val)

getDefault

public String getDefault(String key)

readNext

public LogMessage readNext()
                    throws IOException
Description copied from interface: LogReader
Reads the next LogMessage. Will return null if no more messages can be read.

Specified by:
readNext in interface LogReader
Returns:
Throws:
IOException
See Also:
LogReader.readNext()


Copyright © 2012 jwall.org. All Rights Reserved.