How to move inputStream back to the first line?
- From: www <www@xxxxxxxxxx>
- Date: Fri, 26 Jan 2007 13:54:59 -0500
Hi,
I have an inputStream to read a text file:
BufferedReader inputStream = new BufferedReader(new FileReader(fileName));
String line = inputStream.readLine();
After reading several lines, I hope to bring inputStream back to the first line. How can I do it?
Right now, I do:
inputStream.close();
BufferedReader inputStream = new BufferedReader(new FileReader(fileName)); //start over again. I feel it is a dumb way.
Thank you.
.
- Follow-Ups:
- Re: How to move inputStream back to the first line?
- From: Randolf Richardson
- Re: How to move inputStream back to the first line?
- From: Print Dude
- Re: How to move inputStream back to the first line?
- From: Manish Pandit
- Re: How to move inputStream back to the first line?
- Prev by Date: Re: date in format yy-mm-dd hh:mm
- Next by Date: Re: Why are some people working so hard to answer others' questions?
- Previous by thread: Software Developer Lead for New Mobile Device Product
- Next by thread: Re: How to move inputStream back to the first line?
- Index(es):
Relevant Pages
|