xwdguy
04-09-2007, 02:02 PM
I want to read a file, and have this routine inside a loop; I need to know the proper way to close the loop and avoid re-initializing things I can't reinitialize.
The commands are FileInputStream, InputStreamReader and BufferedReader. Help!!!
fi1 = new FileInputStream(args[1]);
InputStreamStream(args[1]);
BufferedReader b1 = new BufferedReader(r1);
followed by a while loop that knows when I hit the file's end, then a close.
But I'm doing something wrong -- either it goes thru only on the first iteration and never reopens/rewinds, or I get IO errors before I hit the loop a second time.
I'm looking for an answer, not a suggestion of where to look.
The commands are FileInputStream, InputStreamReader and BufferedReader. Help!!!
fi1 = new FileInputStream(args[1]);
InputStreamStream(args[1]);
BufferedReader b1 = new BufferedReader(r1);
followed by a while loop that knows when I hit the file's end, then a close.
But I'm doing something wrong -- either it goes thru only on the first iteration and never reopens/rewinds, or I get IO errors before I hit the loop a second time.
I'm looking for an answer, not a suggestion of where to look.