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]

Re: Patch: fixlet for InputStreamReader




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


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