Ant????Java??????2?
???????????? ???????[ 2014/5/21 10:44:09 ] ??????????????? java
???????1??????????Ant????
????????FileSorter???????????£?
package com.ant.test02;
import java .io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.ListIterator;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;
public class FileSorter extends Task {
private File srcFile;
private File destFile;
public File getSrcFile() {
return srcFile;
}
public void setSrcFile(File srcFile) {
this.srcFile = srcFile;
}
public File getDestFile() {
return destFile;
}
public void setDestFile(File destFile) {
this.destFile = destFile;
}
@Override
public void execute() throws BuildException {
try {
BufferedReader fromFile = new BufferedReader(
new FileReader(srcFile));
BufferedWriter toFile = new BufferedWriter(new FileWriter(destFile));
List<String> list = new ArrayList<String>();
String line = fromFile.readLine();
while (line != null) {
list.add(line);
line = fromFile.readLine();
}
Collections.sort(list);
for (ListIterator<String> li = list.listIterator(); li.hasNext();) {
String str = li.next();
toFile.write(str);
toFile.newLine();
}
fromFile.close();
toFile.close();
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
|
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
Java???????????Щ???????????????Java????????????????Java?б???Map????????Java Web???????????????Java??????????????д?????Java????????7???????????????????????(java .net ?????)???Java??????????Python??????Java webdriver??λ????????′????е?????Java??д??????????????????Java???????????????JavaScript????????????Java?????????????????? Java???????10??????????????Java?м????????????????java???????ü???????????м???????????????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????