This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: RFC: InputStreamReader and OutputStreamWriter


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]