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

Jason Pyeron commented on PDFBOX-4554:
--------------------------------------

you don't want streams wrapping byte[]s because
 # they need to be reset
 # they encourage copying to new byte[]

CMSProcessableInputStream is a hacky, package private tool of bouncy castle.

We (and others) already have ONE byte[], in memory - which comes from a magical 
place, and is not cached on disk as the environment has no writable temp space, 
further it is memory constrained. Why don't we just use the existing byte 
array, and respect the java.lang, java.util, and java.io patterns.

> 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