Package org.aoju.bus.core.io.file
Class LineReadWatcher
java.lang.Object
org.aoju.bus.core.io.watcher.IgnoreWatcher
org.aoju.bus.core.io.file.LineReadWatcher
行处理的Watcher实现
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
ConstructorsConstructorDescriptionLineReadWatcher(RandomAccessFile randomAccessFile, Charset charset, XConsumer<String> lineHandler) 构造 -
Method Summary
Modifier and TypeMethodDescriptionvoidonModify(WatchEvent<?> event, Path currentPath) 文件修改时执行的方法 文件修改可能触发多次voidrun()Methods inherited from class org.aoju.bus.core.io.watcher.IgnoreWatcher
onCreate, onDelete, onOverflow
-
Constructor Details
-
LineReadWatcher
public LineReadWatcher(RandomAccessFile randomAccessFile, Charset charset, XConsumer<String> lineHandler) 构造- Parameters:
randomAccessFile-RandomAccessFilecharset- 编码lineHandler- 行处理器XConsumer实现
-
-
Method Details
-
run
-
onModify
Description copied from interface:Watcher文件修改时执行的方法 文件修改可能触发多次- Specified by:
onModifyin interfaceWatcher- Overrides:
onModifyin classIgnoreWatcher- Parameters:
event- 事件currentPath- 事件发生的当前Path路径
-