/[classpath]/inetlib/source/gnu/inet/ftp/StreamOutputStream.java
ViewVC logotype

Diff of /inetlib/source/gnu/inet/ftp/StreamOutputStream.java

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

revision 1.5 by dog, Thu Oct 21 15:21:54 2004 UTC revision 1.6 by dog, Thu Nov 25 22:15:05 2004 UTC
# Line 1  Line 1 
1  /*  /*
2   * $Id$   * StreamOutputStream.java
3   * Copyright (C) 2003 The Free Software Foundation   * Copyright (C) 2003 The Free Software Foundation
4   *   *
5   * This file is part of GNU inetlib, a library.   * This file is part of GNU inetlib, a library.
# Line 46  import java.io.OutputStream; Line 46  import java.io.OutputStream;
46   * A DTP output stream that implements the FTP stream transfer mode.   * A DTP output stream that implements the FTP stream transfer mode.
47   *   *
48   * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>   * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
  * @version $Revision$ $Date$  
49   */   */
50  class StreamOutputStream extends DTPOutputStream  class StreamOutputStream
51      extends DTPOutputStream
52  {  {
53    
54    StreamOutputStream (DTP dtp, OutputStream out)    StreamOutputStream(DTP dtp, OutputStream out)
55      {    {
56        super (dtp, out);      super(dtp, out);
57      }    }
58      
59    public void write (int c) throws IOException    public void write(int c)
60      {      throws IOException
61        if (transferComplete)    {
62          {      if (transferComplete)
63            return;        {
64          }          return;
65        out.write (c);        }
66      }      out.write(c);
67      }
68    public void write (byte[] b) throws IOException  
69      {    public void write(byte[] b)
70        write (b, 0, b.length);      throws IOException
71      }    {
72        write(b, 0, b.length);
73    public void write (byte[] b, int off, int len) throws IOException    }
74      {    
75        if (transferComplete)    public void write(byte[] b, int off, int len)
76          {      throws IOException
77            return;    {
78          }      if (transferComplete)
79        out.write (b, off, len);        {
80      }          return;
81          }
82        out.write(b, off, len);
83      }
84      
85  }  }
86    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

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