This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Bug in DataInputStream (readInt)
- To: Per Bothner <per at bothner dot com>
- Subject: Re: Bug in DataInputStream (readInt)
- From: Tom Tromey <tromey at redhat dot com>
- Date: 26 Sep 2001 16:26:41 -0600
- Cc: martin dot kahlert at infineon dot com, java at gcc dot gnu dot org
- References: <20010925151917.A10416@keksy.muc.infineon.com> <3BB0ACC1.6080407@bothner.com>
- Reply-To: tromey at redhat dot com
>>>>> "Per" == Per Bothner <per@bothner.com> writes:
>> So why has this been changed? Is there some deep rewrite of the IO
>> classes happening?
Per> I don't know if using the helper buf is a good idea or not. My
Per> first intuition is that it is usually redundant (most of the type
Per> the underlying InputStream would be buffered), and when it isn't,
Per> it's probably a tossup whether it makes any difference.
This got pulled in via Classpath.
I agree it seems dubious. I haven't changed it though.
Per> Yes. If it is going to use a buf, it is going to have to do
Per> something like in.readFully(buf, 0, 4) (except of course
Per> InputStream doesn't have readFully).
I changed calls to `in.read' to `readFully'.
This seemed reasonable to me.
I'm building it now; I'll check it in a bit later.
Tom