[kaffe] CVS kaffe (jserv): Resynced with GNU Classpath:
java.io.PipedInputStream::read positive returned va
Kaffe CVS
cvs-commits at kaffe.org
Mon Apr 4 06:33:36 PDT 2005
PatchSet 5660
Date: 2005/04/04 13:25:31
Author: jserv
Branch: HEAD
Tag: (none)
Log:
Resynced with GNU Classpath: java.io.PipedInputStream::read positive returned value check,
2005-04-04 Jim Huang <jserv at kaffe.org>
Resynced with GNU Classpath.
2005-04-01 Michael Koch <konqueror at gmx.de>
* java/io/PipedInputStream.java
(read): Make sure a positive byte value is returned. Revised javadoc.
Thanks to Olafur Bragason for reporting these bugs.
Members:
ChangeLog:1.3830->1.3831
libraries/javalib/java/io/PipedInputStream.java:1.16->1.17
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3830 kaffe/ChangeLog:1.3831
--- kaffe/ChangeLog:1.3830 Mon Apr 4 11:06:48 2005
+++ kaffe/ChangeLog Mon Apr 4 13:25:31 2005
@@ -1,3 +1,13 @@
+2005-04-04 Jim Huang <jserv at kaffe.org>
+
+ Resynced with GNU Classpath.
+
+ 2005-04-01 Michael Koch <konqueror at gmx.de>
+
+ * java/io/PipedInputStream.java
+ (read): Make sure a positive byte value is returned. Revised javadoc.
+ Thanks to Olafur Bragason for reporting these bugs.
+
2005-04-04 Guilhem Lavaux <guilhem at kaffe.org>,
* FAQ/FAQ.references: New file
Index: kaffe/libraries/javalib/java/io/PipedInputStream.java
diff -u kaffe/libraries/javalib/java/io/PipedInputStream.java:1.16 kaffe/libraries/javalib/java/io/PipedInputStream.java:1.17
--- kaffe/libraries/javalib/java/io/PipedInputStream.java:1.16 Thu Nov 25 03:44:53 2004
+++ kaffe/libraries/javalib/java/io/PipedInputStream.java Mon Apr 4 13:25:30 2005
@@ -1,5 +1,5 @@
/* PipedInputStream.java -- Read portion of piped streams.
- Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -226,18 +226,17 @@
}
/**
- * This method reads bytes from the stream into a caller supplied buffer.
- * It starts storing bytes at position <code>offset</code> into the
- * buffer and
- * reads a maximum of <code>len</code> bytes. Note that this method
- * can actually
- * read fewer than <code>len</code> bytes. The actual number of bytes
- * read is
- * returned. A -1 is returned to indicated that no bytes can be read
+ * This method reads one byte from the stream.
+ * -1 is returned to indicated that no bytes can be read
* because the end of the stream was reached. If the stream is already
* closed, a -1 will again be returned to indicate the end of the stream.
- * <p>
- * This method will block if no byte is available to be read.
+ *
+ * <p>This method will block if no byte is available to be read.</p>
+ *
+ * @return the value of the read byte value, or -1 of the end of the stream
+ * was reached
+ *
+ * @throws IOException if an error occured
*/
public int read() throws IOException
{
@@ -248,7 +247,7 @@
// if this method is never called.
int r = read(read_buf, 0, 1);
- return r != -1 ? read_buf[0] : -1;
+ return r != -1 ? (read_buf[0] & 0xff) : -1;
}
/**
More information about the kaffe
mailing list