This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: fixlet for InputStreamReader
- To: Tom Tromey <tromey at redhat dot com>
- Subject: Re: Patch: fixlet for InputStreamReader
- From: Jeff Sturm <jsturm at one-point dot com>
- Date: Mon, 6 Aug 2001 20:05:12 -0400 (EDT)
- cc: Java Patch List <java-patches at gcc dot gnu dot org>
On 6 Aug 2001, Tom Tromey wrote:
> I'm checking this in on the trunk. This fixes a bug I found in
> InputStreamReader. In some situations it would erroneously decide it
> hit EOF. This happened because it was calling `in.refill ()' in the
> wrong situation.
I was just looking at this problem. Thanks!
I have a nit... the size of "work" buffer is hardcoded to 100. That's the
upper bound on how many characters can be read into an array. Given that
the underlying BufferInputStream buffers 2048 bytes, that hardly seems
optimal.
Ideally the converter would write directly to the user-supplied buffer and
save an array copy.
Jeff