View Single Post
  #8 (permalink)  
Old 04-21-2008, 07:37 AM
Eranga's Avatar
Eranga Eranga is online now
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,603
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Ok, but it's better to explore something on it. Actually I have to work a lot to fill your requirement. Simply I can do this for you. Change the main method as follows.

Code:
public static void main(String args[]) throws Exception{ // TODO Auto-generated method stub String inputFile = null; String searchString = null; String outputFile = null; do { System.out.print("Enter Input File: "); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); inputFile = br.readLine(); System.out.print("Enter Search String: "); BufferedReader br1 = new BufferedReader(new InputStreamReader(System.in)); searchString = br1.readLine(); System.out.print("Enter Output File: "); BufferedReader br2 = new BufferedReader(new InputStreamReader(System.in)); outputFile = br2.readLine(); ReadLogFile logfile = new ReadLogFile(); List log = new ArrayList(); log = logfile.readFile(inputFile,searchString); System.out.println("Reading log file completed:|"); logfile.writeFile(log,outputFile); }while(true); }
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Reply With Quote