Hello,
This is my updated code and here it is, if you find any problem in the code then please guide me with the correct
Code:
Public class bg
{
Public static void hand (String [] args) throws IOException
{
File fl = new File("c:\\bidon.txt ");
FileReader flrd = new FileReader(fl);
BufferedReader buff = new BufferedReader(en);
String aRechercher = "SET PATH";
String ln = "";
int i =-1;
while ((ln = buff.readLine())!=null)
{
System.out.System.out.println(row);
if(row.indexOf(aRechercher)!=-1)
{
/ / System.out.println ( "ligne.indexOf (aRechercher is" + ligne.indexOf (aRechercher));
System.out.System.out.println("found!");
i + +;
System.out.System.out.println("i is" + I);
}
}
}
Public static void testmet(File fl, en FileReader, BufferedReader buff)throws IOException
{
File fl2 = new File("c:\\bidon2.txt ");
FileWriter flwri = new FileWriter(fl2);
BufferedWriter buffwri = new BufferedWriter(flwri);
String aRechercher = "SET PATH";
String ln = "";
int i =0;
while ((ln = buff.readLine())!=null)
{
System.out.System.out.println("ln is"+ online);
i + +;
if (row.indexOf(aRechercher)!=-1)
{
ln + = "bogus";;
buffwri.write(row);
buffwri.newLine();
}
else
{
buffwri.write(row);
buffwri.newLine();
}
}
System.out.System.out.println("i is" + I);
buffwri.close();
}
}
Bookmarks