.。。。。。。。。。。。.Socket。。。。。。lassDMSClient{ privateDMSClientFrameframe。 /** *用于保存日志文件读取位置 */ privateFilepositionFile。 /** *用readLogs生成的文本日志文件 */ privateFiletextLogFile。 /** *原始的unix日志文件 */ privateFilelogFile。 publicstaticfinalintLOG_LENGTH=372。 publicstaticfinalshortLOGIN=7。 publicstaticfinalshortLOGOUT=8。 privatePropertiesconfig。 privateintbatch。 privateFilematchedLogFile。 privateFileloginFile。 privateStringserverHost。 privateintserverPort。 /** *利用构造器初始化对象属性 */ publicDMSClient(>{ //读取配置文件,利用配置文件初始化参数对象 config=newProperties(>。 try{ (newFileInputStream("">>。b5E2RGbCAP }catch(IOExceptione>{ (>。 thrownewRuntimeException(e>。} logFile=newFile(("">>。p1EanqFDPw positionFile=newFile(("">>。DXDiTa9E3d textLogFile=newFile(("">>。RTCrpUDGiT batch=(("batch">>。5PCzVD7HxA matchedLogFile=newFile(("">>。jLBHrnAILg loginFile=newFile(("">>。xHAQX74J0X serverHost=("">。 serverPort=(("">>。LDAYtRyKfE } publicvoidshowReadLogsMsg(Stringmsg>{ if(frame==null>{ (msg>。}else{ (msg>。} } /** *读取日志文件 */ publicvoidreadLogs(>{ //要保证在调用readLog(>时logFile变量要有适用的对象 if(!(>>{ showReadLogsMsg("没有unix日志文件!">。 return。} if((>>{ showReadLogsMsg("文本文件存在!本次不读取了!">。 return。} //读取上回位置判断是否有新记录产生 intn=0。//上次读取的记录号 Scannerin=null。 if((>>{ try{ in=newScanner(pos
数据挖掘DMS代码(JAVA) 来自淘豆网www.taodocs.com转载请标明出处.