/[classpath]/classpath/java/io/PipedReader.java
ViewVC logotype

Diff of /classpath/java/io/PipedReader.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.15 by mkoch, Mon Apr 12 14:46:57 2004 UTC revision 1.16 by mkoch, Tue Nov 16 11:32:36 2004 UTC
# Line 123  public class PipedReader extends Reader Line 123  public class PipedReader extends Reader
123      * This stream is then ready for reading.  If this stream is already      * This stream is then ready for reading.  If this stream is already
124      * connected or has been previously closed, then an exception is thrown      * connected or has been previously closed, then an exception is thrown
125      *      *
126      * @param src The <code>PipedWriter</code> to connect this stream to      * @param source The <code>PipedWriter</code> to connect this stream to
127      *      *
128      * @exception IOException If this PipedReader or <code>source</code>      * @exception IOException If this PipedReader or <code>source</code>
129      *                        has been connected already.      *                        has been connected already.
# Line 218  public class PipedReader extends Reader Line 218  public class PipedReader extends Reader
218      * because the end of the stream was reached.  If the stream is already      * because the end of the stream was reached.  If the stream is already
219      * closed, a -1 will again be returned to indicate the end of the stream.      * closed, a -1 will again be returned to indicate the end of the stream.
220      * <p>      * <p>
221      * This method will block if no chars are available to be read.      * This method will block if no char is available to be read.
     *  
     * @param buf The buffer into which chars will be stored  
     * @param offset The index into the buffer at which to start writing.  
     * @param len The maximum number of chars to read.  
222      */      */
223    public int read() throws IOException    public int read() throws IOException
224    {    {
# Line 233  public class PipedReader extends Reader Line 229  public class PipedReader extends Reader
229      // if this method is never called.      // if this method is never called.
230    
231      int r = read(read_buf, 0, 1);      int r = read(read_buf, 0, 1);
232        return r != -1 ? read_buf[0] : -1;
     if (r == -1)  
       return -1;  
     else  
       return read_buf[0];  
233    }    }
234        
235    /**    /**

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26