BufferedOutputStream.write() premature buffer flush patch

Mark Wielaard mark@klomp.org
Thu Feb 13 20:42:00 GMT 2003


Hi,

The following small patch makes sure that a BufferedOutputStream is only
flushed when really needed (which means if the buffer is full and
another byte should be written). This is more according to spec and how
other jdks do it. It probably doesn't impact that many applications (and
probably only if they depend on this feature for optimization) but it
does fix one Mauve test.

2003-02-13  Mark Wielaard  <mark@klomp.org>
                                                                                
        * java/io/BufferedOutputStream.java (write(int)): Only flush when
        next byte cannot be buffered.

OK for mainline and branch?

Cheers,

Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BufferedOutputStream.patch
Type: text/x-patch
Size: 941 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20030213/9dc4710e/attachment.bin>


More information about the Java-patches mailing list