You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Closed) (JIRA)" <ji...@apache.org> on 2011/10/10 17:51:30 UTC

[jira] [Closed] (IO-251) Add new read method "toByteArray" to handle InputStream with known size

     [ https://issues.apache.org/jira/browse/IO-251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary D. Gregory closed IO-251.
------------------------------


Closing, we released version 2.1.
                
> Add new read method "toByteArray" to handle InputStream with known size
> -----------------------------------------------------------------------
>
>                 Key: IO-251
>                 URL: https://issues.apache.org/jira/browse/IO-251
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Utilities
>    Affects Versions: 1.4
>            Reporter: Marco Albini
>            Priority: Minor
>             Fix For: 2.1
>
>         Attachments: IO-251_toByteArray.patch
>
>
> I suggest adding a new method toByteArray(InputStream input, int size) to IoUtils to handle known size InputStream (e.g. files).
> Current implementation based on copy method consumes more memory than necessary (at least the double) to transform a InputStream into a byte array.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira