This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I need to read a file line by line and put it in different variables depending upon some condition. I am using, BufferedReader para; while((line = para.readLine()) != null) two of the lines in paragraph are 1. this is suresh's 2. key for the home. wheen i read line 1 and print the line i see that line = "this is suresh''s" note that ' has been appended by one more '. Why is that ? If i dont want that to happen. what should i be doing? thnaks. Such case can happen only one in while in along paragraph.
Thanks Sigfred!! oops !! I did not mention that my para is defined this way. BufferedReader para = new BufferedReader(new InputStreamReader(stream)); Is there any way that without changing this i get the proper output? Thanks!!
jason adam
Chicken Farmer ()
Ranch Hand
Joined: May 08, 2001
Posts: 1932
posted
0
Building off this example, I compiled the following:
And again, the output comes out as "Saresh's", single quote. What is your variable stream representing?
Sigfred Zamo
Ranch Hand
Joined: Mar 04, 2002
Posts: 44
posted
0
Well, I tried this way:
..and I got the same result.. try copypasting your code..
Gemini Moses
Ranch Hand
Joined: Jan 04, 2001
Posts: 244
posted
0
Oho... I did not realise that Sigfred is suggesting that your code should give result you want as is!!
Sorry guys I see that the get method from some one elses class which i am using here seem to be producing my problem (never trust blindly Thanks for all your responses.....
Gemini Moses
Ranch Hand
Joined: Jan 04, 2001
Posts: 244
posted
0
Can someone point me to a method to replace '' marks from a string with single ' e. g suresh''s key is in the room near mahesh''s room. should produce result, suresh's key is in the room near mahesh's room.