Jacson

de.spieleck.app.jacson.source
Class TailSource.WatchedFile

java.lang.Object
  extended byde.spieleck.app.jacson.source.TailSource.WatchedFile
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
TailSource

protected class TailSource.WatchedFile
extends java.lang.Object
implements java.lang.Runnable

Encapsulate a file with the ability to check for new bytes and a Runnable to fetch new bytes.


Constructor Summary
TailSource.WatchedFile(java.lang.String label, java.lang.String fname)
           
 
Method Summary
 boolean isChanged()
           
 boolean isInProgress()
           
protected  void putAChunk()
          Enqueue a finished line and clear the line buffer
 void readAhead()
          Modified handling of CR LF and EOF compared to Sun implementation.
 void run()
           
 void setInProgress(boolean inProgress)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TailSource.WatchedFile

public TailSource.WatchedFile(java.lang.String label,
                              java.lang.String fname)
                       throws java.io.IOException
Method Detail

isChanged

public boolean isChanged()

setInProgress

public void setInProgress(boolean inProgress)

isInProgress

public boolean isInProgress()

run

public void run()
Specified by:
run in interface java.lang.Runnable

putAChunk

protected void putAChunk()
Enqueue a finished line and clear the line buffer


readAhead

public void readAhead()
               throws java.io.IOException
Modified handling of CR LF and EOF compared to Sun implementation. Efficient handling of partial reads.

Throws:
java.io.IOException

toString

public java.lang.String toString()

Spieleck

Copyleft 2002 spieleck.de.