ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Radha Sangal" <Radha.San...@pega.com>
Subject parse file in ant and create new file
Date Thu, 17 Mar 2005 19:59:23 GMT
Is there any task in ant to simulate this simple code of java , reading
one file and extracting content to write into another... in integrate
this small java code , I will have to do lot of work.. was wondering if
its possible through ant itself 

 

BufferedReader in = new BufferedReader(new
FileReader("C:\\WrapperCabInstaller.log"));

                    BufferedWriter out = new BufferedWriter(new
FileWriter("C:\\Cab_version_information.log"));

                    String str;

                    while ((str = in.readLine()) != null) {

                        if(str.indexOf("[java] Cab") != -1){

                                    System.out.println(str);

                                    out.write(str);

                                     out.newLine();

                       }

                        else if(str.indexOf("version") != -1)

                         {

                                    System.out.println(str);

                                    out.write(str);

                                     out.newLine();

                       }


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message