classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] RFC: ChannelReader #1


From: Michael Koch
Subject: Re: [cp-patches] RFC: ChannelReader #1
Date: Mon, 31 Jan 2005 08:59:47 +0100
User-agent: Mutt/1.5.6+20040907i

On Mon, Jan 31, 2005 at 04:51:51AM +0100, Robert Schuster wrote:
> Hi,
> this patch brings support for the 1.4 style constructors of 
> InputStreamReader. These are the ones that take an InputStream and a 
> java.nio.charset.Charset[Decoder]. The implementation is easy and 
> depends on the Channels class
> which has allows to wrap IO-style classes in NIO-style classes.
> 
> However Channels had only a stub implementation for 
> newReader(ReadableByteChannel, CharsetDecoder). I changed that by 
> writing the adapter: gnu.java.nio.ChannelReader .
> 
> The quirk for having the new InputStreamReader constructors isn't that 
> interesting. The real value of the ChannelReader is that we can now 
> start porting our own character decoders (gnu.java.io.decoder) to NIO.
> 
> Dalibor said that Kaffe has a NIO Charset thats based on iconv. With the 
> ChannelReader we can use that from IO, too.
> 
> However. This is only the first version of the patch. Its here for 
> general review. I need to look for corner-cases and exception behavior 
> and polish it up every here and then.
> 
> After that I am going to implement ChannelReader's counterpart: The evil 
> ChannelWriter ... if no else is faster :-)
> 
> The Changelog for the patch will look like this:
> 2005-01-31  Robert Schuster  <address@hidden>
> 
>        * java/nio/channels/Channels: Added FIXMEs for
>        stub method implementation.
>        (newReader): Implemented.
>        * java/io/InputStreamReader:
>        (InputStreamReader(InputStream, Charset)): Implemented.
>        (InputStreamReader(InputStream, CharsetDecoder)): Implemented.
>        * gnu/java/nio/ChannelReader: New class.
> 
> Btw: 
> http://developer.classpath.org/mediation/ClasspathCurrentTopics#head-29147ec4a694664ae99b73085a0922c613f39d64
> 
> Has some more details about GNU Classpath's character conversion 
> frameworks and their problems.

Thanks for you work. I don't tested the patch yet. Can you do some
performance tests ? We should not introduce any speed regressions by
such patches. We should really have testcases for this.


Michael




reply via email to

[Prev in Thread] Current Thread [Next in Thread]