[Bug libgcj/18376] java.io.BufferedWriter outputing extraneous characters?
tromey at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Nov 8 22:17:00 GMT 2004
------- Additional Comments From tromey at gcc dot gnu dot org 2004-11-08 22:17 -------
The code says:
while (br.read(charBuff,0,fileLength) != -1)
bw.write(charBuff,0,fileLength);
There is no guarantee that read() will fill the buffer.
If you see a partial read, you will then write a full buffer,
meaning that the remainder of the buffer will be zero
(or leftovers from an earlier read).
So, I think this is not a libgcj bug.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18376
More information about the Gcc-bugs
mailing list