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:
Bhargav, how big is each line that it is too big for rec? Also, a tip: instead of creating a File object, and a FileReader object, you can just write BufferedReader br = new BufferedReader(new FileReader(new File("test.txt"))) unless you need to use some of the functions of File or FileReader later on. In regard to your problem, you could try reading in each line character by character until you hit the end of line character and then read from the next line the same way. You could then use an array to store the variables, or use a Vector. There probably is a better solution, but that's all I can think of. Any other ideas, anyone? > File f = new File("Test.txt"); > while((rec = br.readLine()) != null) > itis unable to corporate the whole record in variable "rec"
Replies: |
Sponsored Links
|