BufferedInputStream.java (skip): Return zero on EOF.

2004-11-17  David Daney  <ddaney@avtrex.com>

	* java/io/BufferedInputStream.java (skip): Return zero on EOF.

From-SVN: r90832
This commit is contained in:
David Daney 2004-11-17 23:51:18 +00:00 committed by David Daney
parent 07d05ffdac
commit 188cd44d12
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2004-11-17 David Daney <ddaney@avtrex.com>
* java/io/BufferedInputStream.java (skip): Return zero on EOF.
2004-11-17 Michael Koch <konqueror@gmx.de>
* java/net/Socket.java (getPort): Return 0 in error case.

View File

@ -321,7 +321,7 @@ public class BufferedInputStream extends FilterInputStream
if (n < origN)
break;
else
return -1; // No bytes were read before EOF.
return 0; // No bytes were read before EOF.
int numread = (int) Math.min((long) (count - pos), n);
pos += numread;