Luky Library - 4.1.1 (20061117-1148)

luky.linux
Class FileTail

java.lang.Object
  extended by luky.events.MyEventManager
      extended by luky.linux.FileTail
All Implemented Interfaces:
Runnable

public class FileTail
extends MyEventManager
implements Runnable

This class tails to a file and pass the contents to a manageble buffer

Revision Changes :

Version:
1.00
Author:
Chris Lukassen
 

Field Summary
 
Fields inherited from class luky.events.MyEventManager
listenerList
 
Constructor Summary
FileTail(int maxSize, String name)
          Alternative constructor
FileTail(String name)
          default constructor
 
Method Summary
 LinkedList getLines()
          get lines, returns the last lines (maxSize)
 void run()
          Start tailing the file
 void stop()
          stop tailing the file
 
Methods inherited from class luky.events.MyEventManager
addMyEventListener, fireMyEvent, removeMyEventListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileTail

public FileTail(String name)
default constructor

Parameters:
name - the file to be tailed

FileTail

public FileTail(int maxSize,
                String name)
Alternative constructor

Parameters:
name - the file to be tailed
maxSize - number of lines kept online
Method Detail

stop

public void stop()
stop tailing the file


getLines

public LinkedList getLines()
get lines, returns the last lines (maxSize)


run

public void run()
Start tailing the file

Specified by:
run in interface Runnable

Luky Library - 4.1.1 (20061117-1148)