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

Diff of /inetlib/source/gnu/inet/ftp/DTPInputStream.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.IOException; Line 40  import java.io.IOException;
40  abstract class DTPInputStream extends FilterInputStream  abstract class DTPInputStream extends FilterInputStream
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 in the underlying socket stream           * @param in the underlying socket stream
50           */           */
51          DTPInputStream(DTP dtp, InputStream in)      DTPInputStream(DTP dtp, InputStream in)
52          {    {
53                  super(in);      super(in);
54                  this.dtp = dtp;      this.dtp = dtp;
55                  transferComplete = false;      transferComplete = false;
56          }    }
57    
58          /**          /**
59           * Marks this input stream complete.           * Marks this input stream complete.
60           * This is called by the DTP.           * This is called by the DTP.
61           */           */
62          void setTransferComplete(boolean flag)    void setTransferComplete(boolean flag)
63          {    {
64                  transferComplete = flag;      transferComplete = flag;
65          }    }
66    
67          public abstract int read()    public abstract int read() throws IOException;
                 throws IOException;  
68    
69          public abstract int read(byte[] buf)    public abstract int read(byte[]buf) throws IOException;
                 throws IOException;  
70    
71          public abstract int read(byte[] buf, int off, int len)    public abstract int read(byte[]buf, int off, int len) throws IOException;
                 throws IOException;  
72    
73          /**          /**
74           * Notifies the controlling DTP that this stream has completed transfer.           * Notifies the controlling DTP that this stream has completed transfer.
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