Hey,
When I try to sign (detached signature) a file larger than approx. 40 MB I get
an "Out of Memory Error".
I've looked into what is causing this and found that problem lies in the last
line of the XMLSignatureInput class 

        bytes=JavaUtils.getBytesFromStream(_inputOctetStreamProxy);
        _inputOctetStreamProxy=new ByteArrayInputStream(bytes);
        return _inputOctetStreamProxy;

When the JavaUtils method getBytesFromStream is called the entire file is being
 converted to a byte array. But apparently Java is unable to handle such a large
byte array and therefore crashes.

Isn't there a way to implement this without reading all the content into an
byte[]  ?

I hope someone has an idea to solve this problem. If you experienced the same
problem or been able to sign larger files, please let me know.

Thanks in advance
Rune 

Reply via email to