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

Diff of /classpath/java/io/PrintStream.java

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

revision 1.7 by mkoch, Sun Mar 23 10:53:30 2003 UTC revision 1.8 by mkoch, Mon Mar 24 10:19:19 2003 UTC
# Line 482  public class PrintStream extends FilterO Line 482  public class PrintStream extends FilterO
482     * @param offset The index into the array to start writing from     * @param offset The index into the array to start writing from
483     * @param len The number of bytes to write     * @param len The number of bytes to write
484     */     */
485    public synchronized void write(byte[] buf, int offset, int len)    public synchronized void write (byte[] buffer, int offset, int len)
486    {    {
487      // We actually have to implement this method too. Flush first so that      // We actually have to implement this method too. Flush first so that
488      // things get written in the right order.      // things get written in the right order.
# Line 490  public class PrintStream extends FilterO Line 490  public class PrintStream extends FilterO
490    
491      try      try
492        {        {
493          out.write(buf, offset, len);          out.write(buffer, offset, len);
494    
495          if (auto_flush)          if (auto_flush)
496            for (int i = offset; i < len; i++)            for (int i = offset; i < len; i++)
497              if ((buf[i] == '\r') || (buf[i] == '\n'))              if ((buffer[i] == '\r') || (buffer[i] == '\n'))
498                {                {
499                  flush();                  flush();
500                  break;                  break;
501                }                }
502        }        }
503      catch(IOException e)      catch (IOException e)
504        {        {
505          error_occurred = true;          error_occurred = true;
506        }        }

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

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