commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (Resolved) (JIRA)" <>
Subject [jira] [Resolved] (IO-293) Reduce memory consumption when reading file into byte[]
Date Tue, 29 Nov 2011 15:28:39 GMT


Sebb resolved IO-293.

    Resolution: Not A Problem

The patch effectively amounts to inlining the code for IOUtils.toByteArray and does not save
any memory as far as I can tell.
> Reduce memory consumption when reading file into byte[]
> -------------------------------------------------------
>                 Key: IO-293
>                 URL:
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Utilities
>    Affects Versions: 2.1
>            Reporter: Daniel Stucky
>         Attachments: FileUtils.patch
> Improvement for method 
> public static byte[] readFileToByteArray(File file):
> The old implementations used twice the amount of memory than was actually needed to read
a file content into a byte[].
> E.g. to read a 1GB file 2GB of heap space where needed.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message