RSS
热门关键字:  java  Ajax  JSP  JSF  Struts
当前位置 : 首页>Java>列表

采用多线程自动监视并扫描指定文件夹中的文件变化

来源: 作者: 时间:2007-09-29 点击:

  采用多线程自动监视并扫描指定文件夹中的文件变化,实现其功能的代码由四个java文件组成 :FileListener.javaFileMonitor.javaFileTableModel.javaParseUtility.java。其具体代码如下:

FileListener.java

/*
* FileListener.java
*
* Created on 2007-9-27, 17:58:49
*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package DirectoryScanner;

/**
*
* @author Hale Chou
*/
public interface FileListener {

void dirChanged(FileMonitor monitor);

}

FileMonitor.java

/*
* FileMonitor.java
*
* Created on 2007-9-27, 17:59:05
*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package DirectoryScanner;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

/**
*
* @author Hale Chou
*/
public class FileMonitor implements Runnable {
List
FileListener

共7页: 上一页 1 [2] [3] [4] [5] [6] [7] 下一页
最新评论共有 0 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名?
注册