[Bug libgcj/18840] New: java.io.BufferedInputStream.read(byte[],..) methods don't attempt to read as much as possible
greenrd at greenrd dot org
gcc-bugzilla@gcc.gnu.org
Sun Dec 5 03:06:00 GMT 2004
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
More information about the Gcc-bugs
mailing list