A DESCRIPTION OF THE PROBLEM :
In the JavaDoc for the InputStream.read(byte[] b) method, in the "returns" section, the word "is" is used where it should be the word "if":
This:
"...or -1 is there is no more data..."
should be:
"...or -1 if there is no more data ..."
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.
ACTUAL -
Returns:
the total number of bytes read into the buffer, or -1 is there is no more data because the end of the stream has been reached.
URL OF FAULTY DOCUMENTATION :
http://java.sun.com/javase/6/docs/api/java/io/InputStream.html#read(byte[])
In the JavaDoc for the InputStream.read(byte[] b) method, in the "returns" section, the word "is" is used where it should be the word "if":
This:
"...or -1 is there is no more data..."
should be:
"...or -1 if there is no more data ..."
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.
ACTUAL -
Returns:
the total number of bytes read into the buffer, or -1 is there is no more data because the end of the stream has been reached.
URL OF FAULTY DOCUMENTATION :
http://java.sun.com/javase/6/docs/api/java/io/InputStream.html#read(byte[])
- relates to
-
JDK-5088957 java.io.InputStream.read(byte[]) has a typo
- Resolved