commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (JIRA)" <>
Subject [jira] Commented: (IO-158) ReaderInputStream implementation
Date Tue, 11 Mar 2008 21:50:46 GMT


Andreas Veithen commented on IO-158:

In my opinion, design-wise the best alternative would be to use the java.nio.charset classes.
Some time ago I used this approach to write an OutputStream implementation that decodes the
stream, decomposes it into lines and sends them to a logger. I've refactored this code to
isolate the character decoding part. This gives a WriterOutputStream, which would be the natural
counterpart to the ReaderInputStream discussed here. The code can be found here (I agree to
donate it to Commons IO):

> ReaderInputStream implementation
> --------------------------------
>                 Key: IO-158
>                 URL:
>             Project: Commons IO
>          Issue Type: Wish
>            Reporter: Andreas Veithen
>            Priority: Minor
> The standard Java class InputStreamReader converts a Reader into an InputStream. In some
cases it is necessary to do the reverse, i.e. to convert a Reader into an InputStream. Several
frameworks and libraries have their own implementation of this functionality (google for "ReaderInputStream").
Among these are at least four Apache projects: Ant, iBatis, James and XMLBeans. Commons IO
would be a good place to share a common implementation.

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

View raw message