private Runnable dodownload() throws IOException {
return new Runnable() {
@Override
public void run() {
String basepath = getResourceBasePath();
List tfeepaids = getTfeepaidByTime();
String timeName = getOneDayForDown();
String KjDownResourcePath = "";
String id = "";
for (Tfeepaid tfeepaid : tfeepaids) {
id = tfeepaid.getFcertid();
KjDownResourcePath = new File(basepath, "down/" + id + "-" + timeName + ".txt").getAbsolutePath();
ensureDirectory(KjDownResourcePath);
StringBuffer sb = new StringBuffer();
sb.append(tfeepaid.getFlastcommit());
sb.append("\t");
sb.append("\r\n");
// TODO 其他数据据字段的设置20190314
try {
BufferedWriter bw = new BufferedWriter(
new OutputStreamWriter(new FileOutputStream(KjDownResourcePath)));
bw.write(sb.toString());
bw.flush();
bw.close();
} catch (IOException e) {
e.printStackTrace();
}
} } }; }
相关分类