GitHub user ilmarmors opened a pull request: https://github.com/apache/commons-io/pull/38
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 https://github.com/ilmarmors/commons-io master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/commons-io/pull/38.patch 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 <ilm...@delibero.lv> 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org