40 |
interface DTP |
interface DTP |
41 |
{ |
{ |
42 |
|
|
43 |
/** |
/** |
44 |
* Returns an input stream from which a remote file can be read. |
* Returns an input stream from which a remote file can be read. |
45 |
*/ |
*/ |
46 |
InputStream getInputStream() |
InputStream getInputStream() throws IOException; |
|
throws IOException; |
|
47 |
|
|
48 |
/** |
/** |
49 |
* Returns an output stream to which a local file can be written for |
* Returns an output stream to which a local file can be written for |
50 |
* upload. |
* upload. |
51 |
*/ |
*/ |
52 |
OutputStream getOutputStream() |
OutputStream getOutputStream() throws IOException; |
|
throws IOException; |
|
53 |
|
|
54 |
/** |
/** |
55 |
* Sets the transfer mode to be used with this DTP. |
* Sets the transfer mode to be used with this DTP. |
56 |
*/ |
*/ |
57 |
void setTransferMode(int mode); |
void setTransferMode(int mode); |
58 |
|
|
59 |
/** |
/** |
60 |
* Marks this DTP completed. |
* Marks this DTP completed. |
61 |
* When the current transfer has finished, any resources will be released. |
* When the current transfer has finished, any resources will be released. |
62 |
*/ |
*/ |
63 |
void complete(); |
void complete(); |
64 |
|
|
65 |
/** |
/** |
66 |
* Aborts any current transfer and releases all resources held by this |
* Aborts any current transfer and releases all resources held by this |
67 |
* DTP. |
* DTP. |
68 |
* @return true if a transfer was interrupted, false otherwise |
* @return true if a transfer was interrupted, false otherwise |
69 |
*/ |
*/ |
70 |
boolean abort(); |
boolean abort(); |
71 |
|
|
72 |
/** |
/** |
73 |
* Used to notify the DTP that its current transfer is complete. |
* Used to notify the DTP that its current transfer is complete. |
74 |
* This occurs either when end-of-stream is reached or a 226 response is |
* This occurs either when end-of-stream is reached or a 226 response is |
75 |
* received. |
* received. |
76 |
*/ |
*/ |
77 |
void transferComplete(); |
void transferComplete(); |
78 |
|
|
79 |
} |
} |