/[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.2 by dog, Sun Oct 19 16:16:49 2003 UTC revision 1.3 by dog, Mon Nov 10 12:29:56 2003 UTC
# Line 40  import java.io.OutputStream; Line 40  import java.io.OutputStream;
40  abstract class DTPOutputStream extends FilterOutputStream  abstract class DTPOutputStream extends FilterOutputStream
41  {  {
42    
43    DTP dtp;      DTP dtp;
44    boolean transferComplete;      boolean transferComplete;
45        
46          /**      /**
47           * Constructor.       * Constructor.
48           * @param dtp the controlling data transfer process       * @param dtp the controlling data transfer process
49           * @param out the socket output stream           * @param out the socket output stream
50           */       */
51      DTPOutputStream(DTP dtp, OutputStream out)      DTPOutputStream(DTP dtp, OutputStream out)
52    {      {
53      super(out);          super(out);
54      this.dtp = dtp;          this.dtp = dtp;
55      transferComplete = false;          transferComplete = false;
56    }      }
57        
58          /**      /**
59           * Tells this stream whether transfer has completed or not.       * Tells this stream whether transfer has completed or not.
60           * @param flag true if the process has completed, false otherwise       * @param flag true if the process has completed, false otherwise
61           */       */
62    void setTransferComplete(boolean flag)      void setTransferComplete(boolean flag)
63    {      {
64      transferComplete = flag;          transferComplete = flag;
65    }      }
66        
67    public abstract void write(int c) throws IOException;      public abstract void write(int c) throws IOException;
68        
69    public abstract void write(byte[]b) throws IOException;      public abstract void write(byte[]b) throws IOException;
70        
71    public abstract void write(byte[]b, int off, int len) throws IOException;      public abstract void write(byte[]b, int off, int len) throws IOException;
72        
73          /**      /**
74           * Notifies the controlling DTP that this stream has been terminated.       * Notifies the controlling DTP that this stream has been terminated.
75           */       */
76    public void close() throws IOException      public void close() throws IOException
77    {      {
78      dtp.transferComplete();          dtp.transferComplete();
79    }      }
80        
81  }  }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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