Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
Hi, I am writing a program that involves reading and writing to files. I was wondering if I've started reading from a file, and I want to start reading from the beginning of that file, how I'd do it. I am using BufferedReader in addition to a FileReader. I know that BufferedReader has a method called mark, and a method called reset. Will this work? Also, the mark method takes an integer that limits the number of characters that may be read while still preserving the mark. What if I don't want a limit? How do I specify no limit? Is there any other way that I can start reading from the beginning of the file (such as close and open the FileReader stream)? Thanks in advance for the help. Replies: |
Sponsored Links
|