This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Merging BufferedInputStream with Classpath


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]