commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IO-251) Add new read method "toByteArray" to handle InputStream with known size
Date Sun, 02 Jul 2017 15:13:01 GMT

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

ASF GitHub Bot commented on IO-251:
-----------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/commons-io/pull/38


> 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 was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message