java best way to transfer images
- by d.raev
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)