public class WatchMonitor extends Object
| 构造器和说明 |
|---|
WatchMonitor(File file)
构造
|
WatchMonitor(Path path)
构造
|
WatchMonitor(String path)
构造
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
关闭监听
|
static WatchMonitor |
create(File file)
创建并初始化监听
|
static WatchMonitor |
create(Path path)
创建并初始化监听
|
static WatchMonitor |
create(String path)
创建并初始化监听
|
void |
init()
初始化
|
void |
start(WatchListener listener)
开始监听事件
|
public WatchMonitor(Path path)
path - Pathpublic WatchMonitor(File file)
file - 文件public WatchMonitor(String path)
path - 字符串路径public static WatchMonitor create(Path path)
path - 路径public static WatchMonitor create(File file)
file - 文件public static WatchMonitor create(String path)
path - 路径public void init()
IOExceptionpublic void start(WatchListener listener)
listener - 监听InterruptedExceptionpublic void close()
Copyright © 2016. All rights reserved.