commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (IO-346) Add ByteArrayOutputStream.toInputStream()
Date Wed, 17 Apr 2013 14:41:16 GMT

     [ https://issues.apache.org/jira/browse/IO-346?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sebb resolved IO-346.
---------------------

       Resolution: Fixed
    Fix Version/s: 2.5

URL: http://svn.apache.org/r1468938
Log:
IO-346 Add ByteArrayOutputStream.toInputStream()

Modified:
    commons/proper/io/trunk/src/changes/changes.xml
    commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/ByteArrayOutputStream.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/ByteArrayOutputStreamTestCase.java
                
> Add ByteArrayOutputStream.toInputStream()
> -----------------------------------------
>
>                 Key: IO-346
>                 URL: https://issues.apache.org/jira/browse/IO-346
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Streams/Writers
>    Affects Versions: 2.4
>            Reporter: Fredrik Kjellberg
>            Priority: Minor
>             Fix For: 2.5
>
>         Attachments: toInputStream.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message