Thread: BufferedReader
View Single Post
Old Apr 5th, 2006, 1:55 AM   #2
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 928
Rep Power: 4 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
If you really want to rewind the BufferedReader, you'll find the mark() and reset() methods useful.

However, I suggest that instead you store all the data you read in from the BufferedReader initially, close() it, and use the data you have already stored rather than rereading it.

For example, why not replace

c.print ("first line 1: " + input2.readLine());
with

c.print ("first line 1: " + inputStringFinal[0]);
titaniumdecoy is online now   Reply With Quote