Package | Description |
---|---|
cn.hutool.core.io.file |
对文件读写的封装,包括文件拷贝、文件读取、文件写出、行处理等
|
cn.hutool.core.io.watch |
基于JDK7+ WatchService的文件和目录监听封装,支持多级目录
|
cn.hutool.core.io.watch.watchers |
文件监听中的观察者实现类,包括延迟处理、处理链等
|
Modifier and Type | Class and Description |
---|---|
class |
LineReadWatcher
行处理的Watcher实现
|
Modifier and Type | Class and Description |
---|---|
class |
SimpleWatcher
空白WatchListener
用户继承此类后实现需要监听的方法 |
Modifier and Type | Method and Description |
---|---|
static WatchMonitor |
WatchUtil.createAll(File file,
int maxDepth,
Watcher watcher)
创建并初始化监听,监听所有事件
|
static WatchMonitor |
WatchUtil.createAll(File file,
Watcher watcher)
创建并初始化监听,监听所有事件
|
static WatchMonitor |
WatchMonitor.createAll(File file,
Watcher watcher)
创建并初始化监听,监听所有事件
|
static WatchMonitor |
WatchUtil.createAll(Path path,
int maxDepth,
Watcher watcher)
创建并初始化监听,监听所有事件
|
static WatchMonitor |
WatchUtil.createAll(Path path,
Watcher watcher)
创建并初始化监听,监听所有事件
|
static WatchMonitor |
WatchMonitor.createAll(Path path,
Watcher watcher)
创建并初始化监听,监听所有事件
|
static WatchMonitor |
WatchUtil.createAll(String path,
int maxDepth,
Watcher watcher)
创建并初始化监听,监听所有事件
|
static WatchMonitor |
WatchUtil.createAll(String path,
Watcher watcher)
创建并初始化监听,监听所有事件
|
static WatchMonitor |
WatchMonitor.createAll(String path,
Watcher watcher)
创建并初始化监听,监听所有事件
|
static WatchMonitor |
WatchUtil.createAll(URI uri,
int maxDepth,
Watcher watcher)
创建并初始化监听,监听所有事件
|
static WatchMonitor |
WatchUtil.createAll(URI uri,
Watcher watcher)
创建并初始化监听,监听所有事件
|
static WatchMonitor |
WatchMonitor.createAll(URI uri,
Watcher watcher)
创建并初始化监听,监听所有事件
|
static WatchMonitor |
WatchUtil.createAll(URL url,
int maxDepth,
Watcher watcher)
创建并初始化监听,监听所有事件
|
static WatchMonitor |
WatchUtil.createAll(URL url,
Watcher watcher)
创建并初始化监听,监听所有事件
|
static WatchMonitor |
WatchMonitor.createAll(URL url,
Watcher watcher)
创建并初始化监听,监听所有事件
|
static WatchMonitor |
WatchUtil.createModify(File file,
int maxDepth,
Watcher watcher)
创建并初始化监听,监听修改事件
|
static WatchMonitor |
WatchUtil.createModify(File file,
Watcher watcher)
创建并初始化监听,监听修改事件
|
static WatchMonitor |
WatchUtil.createModify(Path path,
int maxDepth,
Watcher watcher)
创建并初始化监听,监听修改事件
|
static WatchMonitor |
WatchUtil.createModify(Path path,
Watcher watcher)
创建并初始化监听,监听修改事件
|
static WatchMonitor |
WatchUtil.createModify(String path,
int maxDepth,
Watcher watcher)
创建并初始化监听,监听修改事件
|
static WatchMonitor |
WatchUtil.createModify(String path,
Watcher watcher)
创建并初始化监听,监听修改事件
|
static WatchMonitor |
WatchUtil.createModify(URI uri,
int maxDepth,
Watcher watcher)
创建并初始化监听,监听修改事件
|
static WatchMonitor |
WatchUtil.createModify(URI uri,
Watcher watcher)
创建并初始化监听,监听修改事件
|
static WatchMonitor |
WatchUtil.createModify(URL url,
int maxDepth,
Watcher watcher)
创建并初始化监听,监听修改事件
|
static WatchMonitor |
WatchUtil.createModify(URL url,
Watcher watcher)
创建并初始化监听,监听修改事件
|
WatchMonitor |
WatchMonitor.setWatcher(Watcher watcher)
设置监听
多个监听请使用 WatcherChain |
void |
WatchMonitor.watch(Watcher watcher)
开始监听事件,阻塞当前进程
|
void |
WatchServer.watch(Watcher watcher,
Filter<WatchEvent<?>> watchFilter)
执行事件获取并处理
|
Modifier and Type | Class and Description |
---|---|
class |
DelayWatcher
|
class |
IgnoreWatcher
跳过所有事件处理Watcher
用户继承此类后实现需要监听的方法 |
class |
WatcherChain
观察者链
用于加入多个观察者 |
Modifier and Type | Method and Description |
---|---|
Iterator<Watcher> |
WatcherChain.iterator() |
Modifier and Type | Method and Description |
---|---|
WatcherChain |
WatcherChain.addChain(Watcher element) |
static WatcherChain |
WatcherChain.create(Watcher... watchers)
创建观察者链
WatcherChain |
Constructor and Description |
---|
DelayWatcher(Watcher watcher,
long delay)
构造
|
WatcherChain(Watcher... watchers)
构造
|
Copyright © 2024. All rights reserved.