[ 
https://issues.apache.org/jira/browse/PDFBOX-4554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16851872#comment-16851872
 ] 

Tilman Hausherr commented on PDFBOX-4554:
-----------------------------------------

{quote}
What line - after patch is a new byte[SIZE] operation performed in the call 
stack of getSignedContent()?
{quote}
here:
{code:java}
        try (COSFilterInputStream fis = new COSFilterInputStream(pdfFile, 
offset, length, getByteRange()))
        {
            return fis.toByteArray();
        }
{code}
this results in a call to {{IOUtils.toByteArray(this);}}. This is done 
regardless of the patch.

I'm saddened that I didn't get my argument through, which is that you don't 
have to pass different byte arrays. Either that, or there was something that I 
haven't understood that you tried to explain.

> operations taking a byte[] need to allow for offset and length too
> ------------------------------------------------------------------
>
>                 Key: PDFBOX-4554
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4554
>             Project: PDFBox
>          Issue Type: Improvement
>            Reporter: Jason Pyeron
>            Priority: Major
>
> Without this, massive amounts of memory must be copied/allocated to "trim" 
> byte[].
> See forthcoming pull request.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to