/[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.1 by dog, Sun Oct 19 08:51:37 2003 UTC revision 1.2 by dog, Sun Oct 19 16:16:49 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          }    }
           
         public abstract void write(int c)  
                 throws IOException;  
66    
67          public abstract void write(byte[] b)    public abstract void write(int c) throws IOException;
                 throws IOException;  
68    
69          public abstract void write(byte[] b, int off, int len)    public abstract void write(byte[]b) throws IOException;
                 throws IOException;  
70    
71          /**    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()    public void close() throws IOException
77                  throws IOException    {
78          {      dtp.transferComplete();
79                  dtp.transferComplete();    }
80          }  
           
81  }  }

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

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