資源簡(jiǎn)介
從Ftp服務(wù)器定時(shí)下載文件 并對(duì)文件解析 其中用到數(shù)據(jù)庫(kù) 可以自己根據(jù)需求配置

代碼片段和文件信息
package?com.eastlsoft;
import?java.io.File;
import?java.io.FileInputStream;
import?java.io.FileNotFoundException;
import?java.io.IOException;
import?java.io.UnsupportedEncodingException;
import?java.net.URLDecoder;
import?java.util.Properties;
public?class?Configuration?{????
private?static?final?String?CONFIG_FILE_NAME=“config.properties“;
private?static Properties?p=new?Properties();
static?String?path=null;?????
static{???
?????path=Configuration.class.getResource(“/“).getPath()+CONFIG_FILE_NAME;
?????
????????//容錯(cuò)???
try?{??????????????????????????????????????????????
path=URLDecoder.decode(path“utf-8“);?????????????
p.load(new?FileInputStream(new?File(path)));
}?catch?(UnsupportedEncodingException?e)?{
e.printStackTrace();??????
}?catch?(FileNotFoundException?e)?{
e.printStackTrace();
}?catch?(IOException?e)?{
e.printStackTrace();?
}
}???????
public?static?String?getProvinceList(){
return?p.getProperty(“provinceList“);
}
public?static?String?getDownFilePath(){
return?p.getProperty(“downFilePath“);
}????
public?static?String?getPort(){??
return?p.getProperty(“port“);
}?????
public?static?String?getPassword(){
return?p.getProperty(“password“);
}
public?static?String?getUsername(){
return?p.getProperty(“username“);
}??
public?static?String?getIp(){
return?p.getProperty(“ip“);
}
public?static?String?getRiZhi(){??
return?p.getProperty(“rizhishengcheng“);
}
public?static?String?getSplit(){??
return?p.getProperty(“split“);
}
public?static?String?getUrl(){??
return?p.getProperty(“url“);
}
public?static?String?getOracleusername(){??
return?p.getProperty(“oracleusername“);
}
public?static?String?getOraclePassword(){??
return?p.getProperty(“oraclePassword“);
}
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????2392??2013-11-21?15:11??TimerTest\.classpath
?????文件????????300??2013-11-21?15:11??TimerTest\.myme
?????文件???????1752??2013-11-21?15:11??TimerTest\.project
?????文件????????500??2013-11-21?15:11??TimerTest\.settings\.jsdtscope
?????文件????????364??2013-11-21?15:11??TimerTest\.settings\org.eclipse.jdt.core.prefs
?????文件????????465??2013-11-21?15:11??TimerTest\.settings\org.eclipse.wst.common.component
?????文件????????252??2013-11-21?15:11??TimerTest\.settings\org.eclipse.wst.common.project.facet.core.xm
?????文件?????????49??2013-11-21?15:11??TimerTest\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件??????????6??2013-11-21?15:11??TimerTest\.settings\org.eclipse.wst.jsdt.ui.superType.name
?????文件???????1434??2013-11-21?15:11??TimerTest\src\applicationContext.xm
?????文件???????1911??2013-11-21?15:11??TimerTest\src\com\eastlsoft\Configuration.java
?????文件???????8959??2013-11-21?15:11??TimerTest\src\com\eastlsoft\FtpTool.java
?????文件???????6815??2013-11-21?15:11??TimerTest\src\com\eastlsoft\ORSQL.java
?????文件???????4553??2013-11-21?15:11??TimerTest\src\com\eastlsoft\ReMapInsertOracle.java
?????文件???????1009??2013-11-21?15:11??TimerTest\src\com\eastlsoft\Timer.java
?????文件????????190??2013-11-21?15:11??TimerTest\src\config.properties
?????文件????????834??2013-11-21?15:11??TimerTest\WebRoot\index.jsp
?????文件?????????36??2013-11-21?15:11??TimerTest\WebRoot\me
?????文件???????1434??2013-11-21?15:11??TimerTest\WebRoot\WEB-INF\classes\applicationContext.xm
?????文件???????2602??2013-11-21?15:11??TimerTest\WebRoot\WEB-INF\classes\com\eastlsoft\Configuration.class
?????文件???????7963??2013-11-21?15:11??TimerTest\WebRoot\WEB-INF\classes\com\eastlsoft\FtpTool.class
?????文件???????6000??2013-11-21?15:11??TimerTest\WebRoot\WEB-INF\classes\com\eastlsoft\ORSQL.class
?????文件???????5577??2013-11-21?15:11??TimerTest\WebRoot\WEB-INF\classes\com\eastlsoft\ReMapInsertOracle.class
?????文件???????1251??2013-11-21?15:11??TimerTest\WebRoot\WEB-INF\classes\com\eastlsoft\Timer.class
?????文件????????190??2013-11-21?15:11??TimerTest\WebRoot\WEB-INF\classes\config.properties
?????文件???????4467??2013-11-21?15:11??TimerTest\WebRoot\WEB-INF\lib\aopalliance-1.0.jar
?????文件???????5848??2013-11-21?15:11??TimerTest\WebRoot\WEB-INF\lib\common-annotations.jar
?????文件?????575389??2013-11-21?15:11??TimerTest\WebRoot\WEB-INF\lib\commons-collections-3.2.1.jar
?????文件?????159509??2013-11-21?15:11??TimerTest\WebRoot\WEB-INF\lib\commons-io-2.0.1.jar
?????文件?????315805??2013-11-21?15:11??TimerTest\WebRoot\WEB-INF\lib\commons-lang3-3.1.jar
............此處省略34個(gè)文件信息
評(píng)論
共有 條評(píng)論