KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > commons > vfs > provider > ftp > FtpClient


1 /*
2  * Copyright 2002-2005 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.commons.vfs.provider.ftp;
17
18 import org.apache.commons.net.ftp.FTPFile;
19 import org.apache.commons.vfs.FileSystemException;
20
21 import java.io.IOException JavaDoc;
22 import java.io.InputStream JavaDoc;
23 import java.io.OutputStream JavaDoc;
24
25 /**
26  * What VFS expects from an ftp client to provide.
27  */

28 public interface FtpClient
29 {
30     boolean isConnected() throws FileSystemException;
31
32     void disconnect() throws IOException JavaDoc;
33
34     FTPFile[] listFiles(String JavaDoc key, String JavaDoc relPath) throws IOException JavaDoc;
35
36     boolean removeDirectory(String JavaDoc relPath) throws IOException JavaDoc;
37
38     boolean deleteFile(String JavaDoc relPath) throws IOException JavaDoc;
39
40     boolean rename(String JavaDoc oldName, String JavaDoc newName) throws IOException JavaDoc;
41
42     boolean makeDirectory(String JavaDoc relPath) throws IOException JavaDoc;
43
44     boolean completePendingCommand() throws IOException JavaDoc;
45
46     InputStream JavaDoc retrieveFileStream(String JavaDoc relPath) throws IOException JavaDoc;
47
48     InputStream JavaDoc retrieveFileStream(String JavaDoc relPath, long restartOffset) throws IOException JavaDoc;
49
50     OutputStream JavaDoc appendFileStream(String JavaDoc relPath) throws IOException JavaDoc;
51
52     OutputStream JavaDoc storeFileStream(String JavaDoc relPath) throws IOException JavaDoc;
53
54     public boolean abort() throws IOException JavaDoc;
55
56     public String JavaDoc getReplyString() throws IOException JavaDoc;
57 }
Popular Tags