|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface which describes FTP protocol functions.
Method Summary | |
void |
abort()
|
void |
changeDirectory(java.lang.String dir)
Change current directory on the server. |
void |
chmod(int mod,
java.lang.String file)
Modify the file permissions. |
void |
delete(java.lang.String file)
Delete the given file. |
boolean |
isPlainFile(java.lang.String file)
Check if the name refers to a normal file as opposed to for example a directory. |
void |
list(java.lang.String path,
java.io.OutputStream data)
Lists the names of the files and directories in the given directory. |
boolean |
login(java.lang.String user,
java.lang.String pass)
Login to server. |
void |
mkdir(java.lang.String dir)
Create a new directory. |
long |
modTime(java.lang.String file)
Find out when a file was last modified. |
void |
nameList(java.lang.String path,
java.io.OutputStream data)
Lists the contents of the given directory. |
java.lang.String |
pwd()
Get the current working directory. |
void |
quit()
Close the ftp session. |
void |
renameFrom(java.lang.String from)
The first step in a rename operation. |
void |
renameTo(java.lang.String to)
The second step in the rename operation. |
void |
retrieve(java.lang.String file,
java.io.OutputStream data,
boolean binary)
Retrieve a file from the server. |
void |
rmdir(java.lang.String dir)
Remove the given directory. |
long |
size(java.lang.String file)
Get the size of a file. |
void |
store(java.lang.String file,
java.io.InputStream data,
boolean binary)
Store a file on the server. |
java.lang.String |
system()
Get the type of system the server is running. |
Method Detail |
public boolean login(java.lang.String user, java.lang.String pass)
user
- Username to login as.pass
- Password.
public void quit()
public boolean isPlainFile(java.lang.String file)
file
- The name of the file.
public void changeDirectory(java.lang.String dir) throws FTPException
dir
- Name of new directory
FTPException
public void renameFrom(java.lang.String from) throws FTPException
renameTo
.
from
- The name of the file to rename.
FTPException
public void renameTo(java.lang.String to) throws FTPException
renameFrom
to
- The new name of the file.
FTPException
public void delete(java.lang.String file) throws FTPException
file
- Name of the file to delete.
FTPException
public void rmdir(java.lang.String dir) throws FTPException
dir
- Directory to remove.
FTPException
public void mkdir(java.lang.String dir) throws FTPException
dir
- Name of directory to create.
FTPException
public void chmod(int mod, java.lang.String file) throws FTPException
mod
- New file permissions.file
- Name of file to modify.
FTPException
public java.lang.String pwd()
public java.lang.String system()
public long modTime(java.lang.String file) throws FTPException
file
- Name of file to investigate.
FTPException
public long size(java.lang.String file) throws FTPException
file
- Name of file to get the size of.
FTPException
public void store(java.lang.String file, java.io.InputStream data, boolean binary) throws FTPException
file
- Name to store file as.data
- Stream from which the contents of the file is read.binary
- Controls the translating of line endings.
FTPException
public void retrieve(java.lang.String file, java.io.OutputStream data, boolean binary) throws FTPException
file
- Name of file to retrieve.data
- Stream to which the file content is written.binary
- Controls the translating of line endings.
FTPException
public void list(java.lang.String path, java.io.OutputStream data) throws FTPException
nameList
is
that the latter appends a trailing '/' to directory names.
path
- Directory to list the contens of.data
- Stream to write the results to.
FTPException
public void nameList(java.lang.String path, java.io.OutputStream data) throws FTPException
list
is
that the this appends a trailing '/' to directory names.
path
- Directory to list the contens of.data
- Stream to write the results to.
FTPException
public void abort()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |