Package lazyj
Class DateFileWatchdog
java.lang.Object
java.util.Observable
lazyj.DateFileWatchdog
This class monitors a specified File for a change and notifies back when the file on disk has changed. It is based on the last modification time of the file.
- 
Constructor SummaryConstructorsConstructorDescriptionDateFileWatchdog(File f, long howOften) Create a watcher for a given fileDateFileWatchdog(String fileName, long howOften) Create a watcher for a given file name
- 
Method SummaryMethods inherited from class java.util.ObservableaddObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
- 
Constructor Details- 
DateFileWatchdogCreate a watcher for a given file name- Parameters:
- fileName- path to the file to monitor
- howOften- How often to verify for a change ( in millis )
- Throws:
- Exception
 
- 
DateFileWatchdogCreate a watcher for a given file- Parameters:
- f-
- howOften- - How often to verify for a change ( in millis )
- Throws:
- Exception
 
 
- 
- 
Method Details- 
getFileGet the file that is monitored for changes- Returns:
- the file that is monitored for changes
 
- 
stopItpublic void stopIt()Stop monitoring this file for changes
- 
finalize
- 
setChangedpublic void setChanged()- Overrides:
- setChangedin class- Observable
 
 
-