[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches] Fix for bug #11190: DataOutputStream.writeUTF() should
From: |
Mark Wielaard |
Subject: |
Re: [cp-patches] Fix for bug #11190: DataOutputStream.writeUTF() should be buffered |
Date: |
Thu, 14 Apr 2005 23:27:40 +0200 |
Hi,
On Thu, 2005-04-14 at 21:57 +0100, Chris Burdess wrote:
> This patch uses a block write to avoid the inefficiency described in
> the bug report.
>
> 2005-04-14 Chris Burdess <address@hidden>
>
> * java/io/DataOutputStream.java (writeUTF): Use block write for
> output.
Nice. This should be a lot more efficient.
It does potentially use a bit more memory but only for insanely big
strings this would be noticable.
Do we have any mauve tests for this?
> if (c >= '\u0001' && c <= '\u007f')
> - write (c);
> + {
> + buf[pos++] = (byte) c;
> + }
Our coding style says no braces for single line blocks.
Could you commit with that change?
Thanks,
Mark
signature.asc
Description: This is a digitally signed message part