public class FileWatcher extends Object implements AutoCloseable
Modifier and Type | Class and Description |
---|---|
static interface |
FileWatcher.Watcher |
Modifier | Constructor and Description |
---|---|
|
FileWatcher() |
protected |
FileWatcher(WatchService watchService,
ExecutorService watcherExecutor,
ExecutorService callbackExecutor) |
Modifier and Type | Method and Description |
---|---|
void |
addWatcher(FileWatcher.Watcher watcher) |
void |
close() |
boolean |
removeWatcher(FileWatcher.Watcher watcher) |
void |
startWatching(File file) |
void |
stopWatching(File file) |
public FileWatcher()
protected FileWatcher(WatchService watchService, ExecutorService watcherExecutor, ExecutorService callbackExecutor)
public void addWatcher(FileWatcher.Watcher watcher)
public boolean removeWatcher(FileWatcher.Watcher watcher)
public void startWatching(File file)
public void stopWatching(File file)
public void close() throws IOException
close
in interface AutoCloseable
IOException
Copyright © 2017. All rights reserved.