Buffered Reader problem
1 posts in topic
Flat View  Flat View

Posted By:   priya_priya
Posted On:   Thursday, April 15, 2004 01:08 AM

I am doing a statistics program in jsp.It reades a log file which is of size more than 20 MB.i am using fileinputstream , bufferedreader's readline method i am reading files.since the file is too large it showing out of error memory.so any other way to read very large file.which method should i have to use.

Re: Buffered Reader problem

Posted By:   Simon_Ablett  
Posted On:   Thursday, April 15, 2004 04:02 AM

BufferedReader won't cache the whole file in one go; not unless you have set the buffer's size to 20Mbytes. Your problem is more likely to be caused by your not discarding lines once they have been read in. I suggest that you probably need to review your own caching methods. If possible, perhaps you should read in a block of N lines, generate the stats, discard the lines and then repeat the process.

About | Sitemap | Contact