convenient way to read text file multiple times without reopening it
- From: Tomas Mikula <tomas.mikula@xxxxxxxxx>
- Date: Thu, 15 Nov 2007 01:26:29 +0100
Hi,
I suppose that a convenient way to read text file is through FileReader.
But FileReader does not support the reset().
So, as a temporal remedy, I am opening the file twice:
Reader fr = new FileReader("filename");
......
fr.close();
......
fr = new FileReader("filename");
......
Of course this is not a clean way. At least, the file could possibly be
removed or renamed by another program between the two calls to "new
FileReader()". So I want to open the file once and then read it
(sequentially) twice.
I suppose Java provides a convenient way for doing it, but I'm unable to
figure it out.
Thank you for pointing me the right way!
Tomas
.
- Follow-Ups:
- Re: convenient way to read text file multiple times without reopening it
- From: Nigel Wade
- Re: convenient way to read text file multiple times without reopening it
- From: Mike Schilling
- Re: convenient way to read text file multiple times without reopening it
- From: Matt Humphrey
- Re: convenient way to read text file multiple times without reopening it
- Prev by Date: Re: Great SWT Program
- Next by Date: Re: Sorting based on multiple parameters
- Previous by thread: Java Frames
- Next by thread: Re: convenient way to read text file multiple times without reopening it
- Index(es):
Relevant Pages
|