Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

large file--> large string --> out of memory exception

807580Apr 5 2009 — edited Oct 29 2009
Hi all,

i'm reading an extremely large file using a byte[] of size around 1000000bytes, whenever i read a chunk from this file, i have to extract some information for indexing this file.
when i try to convert this byte[] to a string to search for the info i need, i get out of memory exception, any idea how can i handle this large byte[].
i tried using bytebuffer and charbuffer classes, but they seem to take too much time and reduce performance.

any ideas??
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 26 2009
Added on Apr 5 2009
9 comments
1,187 views