Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

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!

Why consuming more heap memory when converting Input stream to BufferedImage?

Dinesh.MAug 28 2017

Hi All,

Why more heap memory is consuming when converting jpeg InputStream to BufferedImage. Consuming 1GB even it is 8 MB jpeg file.

Used the syntax as below.

I implemented simple java application with only main method have  4 lines of code.

BufferedImage image = ImageIO.read(inputStream);      ----------> Getting java heap memory error.

Regards,

Mani

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 25 2017
Added on Aug 28 2017
0 comments
324 views