This is the mail archive of the java@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: Bug in DataInputStream (readInt)


>>>>> "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


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