Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.4
-
None
Description
It would be useful to have a toInputStream() method for reading the stored data without allocating a new full size byte array by calling toByteArray().
A flag has been added so reset() do not try to reuse buffers that are currently used by an InputStream. I think this fixes the safety/consistency issue raised in IO-137.
Test cases for the new method with and without reset being called are included in the patch.
Attachments
Attachments
Issue Links
- is related to
-
IO-137 Added method for getting InputStream from ByteArrayOutputStream & IOUtils avoiding unnecessary array allocation and copy
- Closed