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:
i have tried out readLine() but then the record which i am reading from a text file is very large for the string variable which i am using , hence it is reading but then at the end giving exception. pls help... /*****code goes here****/ f = new File("test.txt"); FileReader fr = new FileReader(f); BufferedReader br = new BufferedReader(fr); String rec; while((rec = br.readLine()) != null) psl help it is urgent... bhargav.. > Yes. I've done this before. Create a StringBuffer to hold your data and a BufferedReader to read it in. Then, write a loop that uses readLine() to read in each line of data and append it to what you've already read.
Replies: |
Sponsored Links
|