This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: fixlet for InputStreamReader
- To: Jeff Sturm <jsturm at one-point dot com>
- Subject: Re: Patch: fixlet for InputStreamReader
- From: Tom Tromey <tromey at redhat dot com>
- Date: 08 Aug 2001 12:24:50 -0600
- Cc: Java Patch List <java-patches at gcc dot gnu dot org>
- References: <Pine.LNX.4.10.10108062001490.18744-100000@mars.deadcafe.org>
- Reply-To: tromey at redhat dot com
>>>>> "Jeff" == Jeff Sturm <jsturm@one-point.com> writes:
Jeff> I have a nit... the size of "work" buffer is hardcoded to 100.
Jeff> That's the upper bound on how many characters can be read into
Jeff> an array. Given that the underlying BufferInputStream buffers
Jeff> 2048 bytes, that hardly seems optimal.
That makes sense. Feel free to check in a better value.
Jeff> Ideally the converter would write directly to the user-supplied
Jeff> buffer and save an array copy.
I think that could be done with some changes to refill().
If you're interested, go for it. Like I said earlier, this code could
stand some closer attention. I think it is still possible for it to
fail (go into an infinite loop making no progress) if there is an
incomplete byte sequence at the end of the byte buffer. Bleah.
Tom