Patch: RFC: InputStreamReader and OutputStreamWriter
Bryce McKinlay
mckinlay@redhat.com
Fri Mar 11 04:43:00 GMT 2005
On 10-Mar-05, at 8:03 PM, Tom Tromey wrote:
> I'm not checking this in yet.
>
> This patch is one way to add new java.nio-aware constructors to
> InputStreamReader and OutputStreamWriter. It does this by adding a
> layer of indirection, in the classic mold.
>
> Another approach would be to add a field to InputStreamReader and
> OutputStreamWriter, and then have two paths in each method -- one that
> does what the method does today, and another to forward to a Reader or
> Writer from java.nio.
>
> I don't much care which one we do. One is easier to read, the other
> may have better performance in common situations (I didn't look).
>
> Sometime this year, hopefully, this code will go away or be rewritten
> anyway, when we do the Big Classpath Merge.
>
> Any preferences?
Another approach would be to write a gnu.gcj.convert converter which
wraps an nio converter? That way we wouldn't incur extra overhead in
the common case, and for nio it might even be more efficient than using
getReader().
I think this is fine too, though.
Bryce
More information about the Java-patches
mailing list