info.rolandkrueger.roklib.files
Class FileModificationWatchdog
java.lang.Object
info.rolandkrueger.roklib.files.FileModificationWatchdog
public class FileModificationWatchdog
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_WAIT_INTERVAL
private static final long DEFAULT_WAIT_INTERVAL
- See Also:
- Constant Field Values
mFile
private File mFile
mLastModified
private long mLastModified
mFileModificationListeners
private List<FileModificationListener> mFileModificationListeners
mDirectoryModificationListeners
private List<DirectoryModificationListener> mDirectoryModificationListeners
mWaitInterval
private long mWaitInterval
mTimer
private Timer mTimer
mDirectoryFileCount
private int mDirectoryFileCount
mDirectoryFileHash
private long mDirectoryFileHash
FileModificationWatchdog
public FileModificationWatchdog(File watchedFileOrDirectory,
long waitInterval)
throws FileNotFoundException
- Throws:
FileNotFoundException
FileModificationWatchdog
public FileModificationWatchdog(File watchedFileOrDirectory)
throws FileNotFoundException
- Throws:
FileNotFoundException
FileModificationWatchdog
public FileModificationWatchdog(File watchedDirectory,
DirectoryModificationListener listener,
long waitInterval)
throws FileNotFoundException
- Throws:
FileNotFoundException
FileModificationWatchdog
public FileModificationWatchdog(File watchedDirectory,
DirectoryModificationListener listener)
throws FileNotFoundException
- Throws:
FileNotFoundException
FileModificationWatchdog
public FileModificationWatchdog(File watchedFile,
FileModificationListener listener,
long waitInterval)
throws FileNotFoundException
- Throws:
FileNotFoundException
FileModificationWatchdog
public FileModificationWatchdog(File watchedFile,
FileModificationListener listener)
throws FileNotFoundException
- Throws:
FileNotFoundException
setWaitInterval
public void setWaitInterval(long interval)
startWatching
public void startWatching()
stopWatching
public void stopWatching()
getDirectoryStatistics
private void getDirectoryStatistics()
getDirectoryFileCount
private int getDirectoryFileCount()
getDirectoryFileHash
private long getDirectoryFileHash()
addFileModificationListener
public void addFileModificationListener(FileModificationListener listener)
addDirectoryModificationListener
public void addDirectoryModificationListener(DirectoryModificationListener listener)
removeFileModificationListener
public void removeFileModificationListener(FileModificationListener listener)
removeDirectoryModificationListener
public void removeDirectoryModificationListener(DirectoryModificationListener listener)
getDirModListenerList
private List<DirectoryModificationListener> getDirModListenerList()
getFileModListenerList
private List<FileModificationListener> getFileModListenerList()
isWatchedFileDirectory
public boolean isWatchedFileDirectory()
getWatchedFile
public File getWatchedFile()
fireFilesAdded
private void fireFilesAdded()
fireFilesRemoved
private void fireFilesRemoved()
fireFileDeleted
private void fireFileDeleted()
fireFileChanged
private void fireFileChanged()
Copyright © 2007-2011. All Rights Reserved.