This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgcj/18376] java.io.BufferedWriter outputing extraneous characters?
- From: "tromey at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Nov 2004 22:17:47 -0000
- Subject: [Bug libgcj/18376] java.io.BufferedWriter outputing extraneous characters?
- References: <20041108145729.18376.wayne.gray@coynetextileservices.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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