Commit 8ad2b7a2 by Mark Wielaard Committed by Mark Wielaard

BufferedOutputStream.java (write(int)): Only flush when next byte cannot be buffered.

       * java/io/BufferedOutputStream.java (write(int)): Only flush when
       next byte cannot be buffered.

From-SVN: r62867
parent 1bc8b0ad
2003-02-13 Mark Wielaard <mark@klomp.org>
* java/io/BufferedOutputStream.java (write(int)): Only flush when
next byte cannot be buffered.
2003-02-13 Michael Koch <konqueror@gmx.de>
* java/awt/Label.java
......
/* BufferedOutputStream.java -- Buffer output into large blocks before writing
Copyright (C) 1998, 2000 Free Software Foundation, Inc.
Copyright (C) 1998, 2000, 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
......@@ -189,11 +189,11 @@ finalize() throws IOException
public synchronized void
write(int b) throws IOException
{
buf[count] = (byte)(b & 0xFF);
++count;
if (count == buf.length)
flush();
buf[count] = (byte)(b & 0xFF);
++count;
}
/*************************************************************************/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment