I am working on a project in which I am required to read a file and load the contents in some JComponent to show it to the users.
I was reading the file with the help of stringbuffer/filebuffer and printing in the textpane attached to a scrollbar.
I got heap dume(out of memory space) when a 21 mb file is being loaded.
To avoid this I tried with JTextArea instead of JTextpane.I got sucess but failed with 60 MB of file.
So can anybody please tell me which is the best component to use for data more than 200 MB .
Also I am using StringBuffer to read the file, is there anything else to increase the performance?
Waiting eagerly for you reply !
I was reading the file with the help of stringbuffer/filebuffer and printing in the textpane attached to a scrollbar.
I got heap dume(out of memory space) when a 21 mb file is being loaded.
To avoid this I tried with JTextArea instead of JTextpane.I got sucess but failed with 60 MB of file.
So can anybody please tell me which is the best component to use for data more than 200 MB .
Also I am using StringBuffer to read the file, is there anything else to increase the performance?
Waiting eagerly for you reply !
Comment