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

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

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

revision 1.6 by dog, Thu Oct 21 15:21:54 2004 UTC revision 1.7 by dog, Thu Nov 25 22:15:05 2004 UTC
# Line 1  Line 1 
1  /*  /*
2   * $Id$   * DTPOutputStream.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   * An output stream that notifies a DTP on end of stream.   * An output stream that notifies a DTP on end of stream.
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  abstract class DTPOutputStream extends FilterOutputStream  abstract class DTPOutputStream
51      extends FilterOutputStream
52  {  {
53    
54    DTP dtp;    DTP dtp;
# Line 59  abstract class DTPOutputStream extends F Line 59  abstract class DTPOutputStream extends F
59     * @param dtp the controlling data transfer process     * @param dtp the controlling data transfer process
60     * @param out the socket output stream     * @param out the socket output stream
61     */     */
62    DTPOutputStream (DTP dtp, OutputStream out)    DTPOutputStream(DTP dtp, OutputStream out)
63      {    {
64        super (out);      super(out);
65        this.dtp = dtp;      this.dtp = dtp;
66        transferComplete = false;      transferComplete = false;
67      }    }
68      
69    /**    /**
70     * Tells this stream whether transfer has completed or not.     * Tells this stream whether transfer has completed or not.
71     * @param flag true if the process has completed, false otherwise     * @param flag true if the process has completed, false otherwise
72     */     */
73    void setTransferComplete (boolean flag)    void setTransferComplete(boolean flag)
74      {    {
75        transferComplete = flag;      transferComplete = flag;
76      }    }
77      
78    /**    /**
79     * Notifies the controlling DTP that this stream has been terminated.     * Notifies the controlling DTP that this stream has been terminated.
80     */     */
81    public void close () throws IOException    public void close()
82      {      throws IOException
83        dtp.transferComplete ();    {
84      }      dtp.transferComplete();
85      }
86    
87  }  }
88    

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

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