net.jot.logger
Class JOTFileTailer

java.lang.Object
  extended by net.jot.logger.JOTFileTailer

public class JOTFileTailer
extends java.lang.Object

This is used to "tail" a file (read it from the bottom) this is done tro be fast and not use much memory. This is to be used together with the TailFilter interface The tailfilter interface let you tail only matching lines so this function let you do: A Tail, a Grep, or a combianison of both (Tail | Grep)

Author:
tcolar

Constructor Summary
JOTFileTailer()
          Constructor for the FileTailer object
JOTFileTailer(int length)
          Constructor for the FileTailer object
JOTFileTailer(int length, int separator)
          Constructor for the FileTailer object
 
Method Summary
 void loadFile(java.lang.String file)
          This is to be called to set the file to tail.
 java.util.Vector tail(int max, JOTTailFilter filter)
          This does the job !
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JOTFileTailer

public JOTFileTailer()
Constructor for the FileTailer object


JOTFileTailer

public JOTFileTailer(int length)
Constructor for the FileTailer object

Parameters:
length - Description of Parameter

JOTFileTailer

public JOTFileTailer(int length,
                     int separator)
Constructor for the FileTailer object

Parameters:
separator - Description of Parameter
length - Description of Parameter
Method Detail

loadFile

public void loadFile(java.lang.String file)
              throws java.lang.Exception
This is to be called to set the file to tail.

Parameters:
file - Description of Parameter
Throws:
java.lang.Exception - Description of Exception

tail

public java.util.Vector tail(int max,
                             JOTTailFilter filter)
                      throws java.lang.Exception
This does the job !

Parameters:
max - Description of Parameter
filter - Description of Parameter
Returns:
Description of the Returned Value
Throws:
java.lang.Exception - Description of Exception