InputStreamReader.java (read): If length is 0, return 0.

* java/io/InputStreamReader.java (read): If length is 0, return
	0.  Reset `wpos' and `wcount' when buffer has been filled and
	emptied.
	* java/util/Properties.java (save): Removed `FIXME' comment.
	(load): Invalid characters in \u now treated as terminators.
	Make sure to append character resulting from `\' handling.
	Cast to `char' when appending to key or value.
	(skip_ws): Inverted test for whitespace.

From-SVN: r26862
This commit is contained in:
Tom Tromey 1999-05-10 12:33:07 +00:00 committed by Tom Tromey
parent 05e0b2f47c
commit 9733e4ee31
3 changed files with 31 additions and 10 deletions

View file

@ -111,6 +111,8 @@ public class InputStreamReader extends Reader
}
else
{
if (length == 0)
return 0;
for (;;)
{
in.mark(1);
@ -141,6 +143,11 @@ public class InputStreamReader extends Reader
wpos = 0;
wcount = 0;
}
else if (wavail == 0)
{
wpos = 0;
wcount = 0;
}
int count = read(work, wpos, work.length-wpos);
if (count <= 0)
return -1;