1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
import java.io.*;
public class Test
{
public static void main(String[] args) throws IOException
{
File rep = new File(".");
String[] listefichiers=rep.list();
for(int i=0;i<listefichiers.length;i++)
{
fic(listefichiers[i]);
}
}
static void fic(String chemin) throws IOException
{
BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(new File(chemin)), "iso-8859-1"));
BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(new File("test.txt")), "iso-8859-1"));
String name = in.readLine();
while(!(name.contains("<tr><td class=\"clsLabel\" width=\"600px\"><b><i>")))
{
name = in.readLine();
}
out.write(name);
while(!(name.contains("</b></font><br>")))
{
name = in.readLine();
out.write(name);
}
in.close();
out.close();
}
} |