Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在写入日志文件时读取它。read我曾尝试使用 Scanner 和 RandomAccessFile 并进行了一些搜索,但在有新 IO 之前我无法找到阻止方法的方法。因此,我必须在代码中编写睡眠/等待,但我一直希望有更好的方法?
read
谢谢。