.;
import ;
import ;
import ;
import ;
import ;
import ;
import ;
import ;
import ;
import ;
import .Socket;
import ;
import ;
import ;
import ;
import ;
public class DMSClient {
private DMSClientFrame frame;
/**
* 用于保存日志文件读取位置
*/
private File positionFile;
/**
* 用readLogs生成的文本日志文件
*/
private File textLogFile;
/**
* 原始的unix日志文件
*/
private File logFile;
public static final int LOG_LENGTH=372;
public static final short LOGIN = 7;
public static final short LOGOUT =8;
private Properties config;
private int batch;
private File matchedLogFile;
private File loginFile;
private String serverHost;
private int serverPort;
/**
* 利用构造器初始化对象属性
*/
public DMSClient() {
//读取配置文件,利用配置文件初始化参数对象
config=new Properties();
try {
(new FileInputStream(""));
} catch (IOException e) {
();
throw new RuntimeException(e);
}
logFile = new File((""));
positionFile=new File((""));
textLogFile=new File((""));
batch=(("batch"));
matchedLogFile=new File((""));
loginFile=new File((""));
serverHost=("");
serverPort=((""));
}
public void showReadLogsMsg(String msg){
if(frame==null){
(msg);
}else{
(msg);
}
}
/**
* 读取日志文件
*/
public void readLogs(){
//要保证在调用readLog()时logFile变量要有适用的对象
if(!()){
showReadLogsMsg("没有unix日志文件!");
return;
}
数据挖掘DMS代码(JAVA) 来自淘豆网www.taodocs.com转载请标明出处.