java best way to transfer images
Posted
by
d.raev
on Stack Overflow
See other posts from Stack Overflow
or by d.raev
Published on 2012-11-14T09:57:29Z
Indexed on
2012/11/14
11:00 UTC
Read the original article
Hit count: 260
I have a application that reads a PDF, transform the content to collection of TIF files, and send them to Glass Fish Server for saving.
Usually there are 1-5 pages and it works nice, but when I got a input file with 100+ pages... it throws error on the transfer.
Java heap space
at java.util.Arrays.copyOf(Arrays.java:2786)
at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:94)
Putting more resources is not a good option in my case, so I m looking for a way to optimize it somehow. I store the data in:
HashMap<TifProfile, List<byte[]>
Is there a better way to store or send them ?
EDIT
I did some tests and the final collections for PDF with 80 pages
has size over 280mb (240 tiffs with different settings inside)
© Stack Overflow or respective owner