This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Merging BufferedInputStream with Classpath
- To: java-patches at gcc dot gnu dot org
- Subject: Re: Merging BufferedInputStream with Classpath
- From: Mark Wielaard <mark at klomp dot org>
- Date: Sun, 7 Oct 2001 12:57:05 +0200
- References: <20011007003943.A4110@klomp.org>
Hi,
On Sun, Oct 07, 2001 at 12:39:43AM +0200, Mark Wielaard wrote:
> * java/io/BufferedInputStream.java: Merge with Classpath
>
>OK to commit?
Note that the patch I posted made refill() a private method.
This is incorrect since InputStreamReader accesses refill() directly.
The InputStreamReader.refill() comments actually say:
// We have knowledge of the internals of BufferedInputStream
// here. Eww.
So the following lines of the patch:
>- boolean refill() throws IOException
>+ /**
>+ * Called to refill the buffer (when count is equal or greater the pos).
>+ *
>+ * @return <code>true</code> when <code>buf</code> can be (partly) refilled,
>+ * <code>false</code> otherwise.
>+ */
>+ private boolean refill() throws IOException
> {
> if (markpos < 0)
> count = pos = 0;
Should actually read:
+ /**
+ * Called to refill the buffer (when count is equal or greater the pos).
+ * Package local so BufferedReader can call it when needed.
+ *
+ * @return <code>true</code> when <code>buf</code> can be (partly) refilled,
+ * <code>false</code> otherwise.
+ */
boolean refill() throws IOException
{
if (markpos < 0)
Cheers,
Mark
--
Stuff to read:
<http://www.toad.com/gnu/whatswrong.html>
What's Wrong with Copy Protection, by John Gilmore