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 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
public static final String analyse2() throws IOException
{ File f1 = new File ( "C:/SpiralAF_Client/as/" ) ;
File[] strFilesDirs = f1.listFiles ( );
String ligne="";int e=1;int w=0;String sub="";String subs="";String sub1="";
String lignes="";String lignes1;
for ( int i = 0 ; i < strFilesDirs.length ; i ++ ) {
File nomfich=strFilesDirs[i];
BufferedReader entree = new BufferedReader (new FileReader(nomfich));
int j=0;int k=0;
do{ligne=entree.readLine();
//if1: supprime la ligne après ma condition de if3, if2 insert une ligne meme si elle est nulle
if(ligne!= null)
{
if(ligne.contains("Error</a></td><td>")){e=1;}
if(e==1 && ligne.contains("Error</a></td><td><a href=\"JavaScript:SelectRow") && ligne.contains("</a></td>"))
{int debut=ligne.indexOf("Error");int fin=debut+69;sub=ligne.substring(debut + 45, fin);e=0;int debut1=sub.indexOf(")\">");int fin1=debut1+13;sub1=sub.substring(debut1 +3, fin1);subs=subs+"\r\n"+sub1;
if(sub1.compareTo(lectureactivation.lecture())>0){ligne="";}
else{lignes=lignes+"<tr class=\"bg0\">"+"<th class=\"tableheader\" width=\"30%\">"+"<a href="+nomfich+"> "+strFilesDirs[i]+" </a>"+"</th>"+"<td width=\"70%\">"+" "+"ERREUR system/securite/appl sur le serveur"+" "+sub1+"</td>"+"</tr>"+"\r\n";}}
if(ligne.contains("Warn")){ j=1;}
if(j==1 && ligne.contains("Warn</a></td><td><a href=\"JavaScript:SelectRow")&& ligne.contains("</a></td>"))
{int debut=ligne.indexOf("Warn");int fin=debut+69;sub=ligne.substring(debut + 45, fin);j=0;int debut1=sub.indexOf(")\">");int fin1=debut1+13;sub1=sub.substring(debut1 +3, fin1);subs=subs+"\r\n"+sub1;
if(sub1.compareTo(lectureactivation.lecture())>0){ligne="";}
else{lignes=lignes+"<tr class=\"bg0\">"+"<th class=\"tableheader\" width=\"30%\">"+"<a href="+nomfich+"> "+nomfich+" </a>"+"</th>"+"<td width=\"70%\">"+" "+" Warning au serveur :"+nomfich+" "+sub1+"</td>"+"</tr>"+"\r\n";}}
}
}
while(ligne != null );
entree.close();}
return lignes;
} |
Partager