JAVA获得股票数据大全(三)

2014-11-24 08:22:15 · 作者: · 浏览: 5
lic String formatData(String baseData){

String result = null;
if(!"".equals(baseData) && baseData != null){
if(baseData.length() > 1){
result = baseData.substring(1,baseData.length());
result = result.substring(0, result.length()-1);
}else{
result = baseData;
}
}else{
result = "";
}
return result.trim();
}

public static void main(String[] args) throws IOException {

CSVUtitl test = new CSVUtitl();
try{

File path = new File("e:\\data");
File[] f = path.listFiles();
List l = new ArrayList();
for(int i=0;i if(f[i].getName().endsWith(".csv"))
l.add(f[i]); www.2cto.com
}
Iterator it = l.iterator();
while(it.hasNext()){
File ff = (File)it.next();
test.run(path.toString()+File.separator+ff.getName());
}
}catch (Exception e){

}
}

}
作者:fatOwen