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.x
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.
-
You can reply to this email to add a comment to the issue online.