如果遇到chm文件打开是空白的,点击选项→Internet选项→确定→主页 就可以恢复
File f = new File(fileName)RandomAccessFile raf = new RandomAccessFile(f, "rw")
FileChannel fc = raf.getChannel()
FileLock fl = fc.tryLock()
if (fl.isValid()) {
Thread.sleep(30000)//do something here, 这时用notepad打开无法修改.
fl.release()
}
raf.close()
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)