commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilmarmors <>
Subject [GitHub] commons-io pull request #38: FileUtils.readFileToByteArray - optimize readin...
Date Sun, 02 Jul 2017 13:12:33 GMT
GitHub user ilmarmors opened a pull request:

    FileUtils.readFileToByteArray - optimize reading of files with known size

    IO-251 added optimization for reading files with known size as byte arrays,  but it was
reverted in IO-453 due to regression, because File.length() method may return 0 for path files
denoting system-dependent entities such as devices or pipes
    More optimal solution is to treat 0 as unknown size, but if size is known (> 0) use
more efficient approach and read content into pre-allocated byte array with exact size.

You can merge this pull request into a Git repository by running:

    $ git pull master

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #38
commit 3ce13884f3b2d78c6ca6cbf9a85c240c6b6532c3
Author: Ilmars Poikans <>
Date:   2017-07-02T13:01:23Z

    FileUtils.readFileToByteArray - optimize reading of files with known size


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message