[IO] [PATCH] Helper classes for controlling closing of streams
--------------------------------------------------------------

                 Key: IO-122
                 URL: https://issues.apache.org/jira/browse/IO-122
             Project: Commons IO
          Issue Type: New Feature
          Components: Streams/Writers
            Reporter: Jukka Zitting
            Priority: Minor


Java API docs are typically not very clear on whether a component that accepts 
an input or output stream will close the stream. This can easily lead to cases 
where streams are either prematurely closed (which is typically easy to detect) 
or where an unclosed stream will unnecessarily consume system resources.

The attached patch adds a set of helper classes that allow applications to 
better control streams even when working with components that don't clearly 
define whether they close streams or not. The added classes are:

    org.apache.commons.io.input.AutoCloseInputStream
    org.apache.commons.io.input.ClosedInputStream
    org.apache.commons.io.input.CloseShieldInputStream
    org.apache.commons.io.output.ClosedOutputStream
    org.apache.commons.io.output.CloseShieldOutputStream

See the javadocs in the patch for more details and typical use cases. I've 
included "@since 1.4" tags in the javadocs in hope that this patch could be 
included in the next release.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to