This is the mail archive of the
java-prs@gcc.gnu.org
mailing list for the Java project.
[Bug libgcj/18840] New: java.io.BufferedInputStream.read(byte[],..) methods don't attempt to read as much as possible
- From: "greenrd at greenrd dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: java-prs at gcc dot gnu dot org
- Date: 5 Dec 2004 03:06:52 -0000
- Subject: [Bug libgcj/18840] New: java.io.BufferedInputStream.read(byte[],..) methods don't attempt to read as much as possible
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The Sun Javadoc for java.io.BufferedInputStream.read(byte[],int,int) in version
1.4.2 states:
" This method implements the general contract of the corresponding read method
of the InputStream class. As an additional convenience, it attempts to read as
many bytes as possible by repeatedly invoking the read method of the underlying
stream. This iterated read continues until one of the following conditions
becomes true:
* The specified number of bytes have been read,
* The read method of the underlying stream returns -1, indicating
end-of-file, or
* The available method of the underlying stream returns zero, indicating
that further input requests would block."
However, the libgcj implementation does not do this iterated reading.
Code which assumes this behaviour (e.g. IBM's ICU4j) may fail.
This bug exists in mainline.
--
Summary: java.io.BufferedInputStream.read(byte[],..) methods
don't attempt to read as much as possible
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libgcj
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: greenrd at greenrd dot org
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18840