public interface FtpSupportIntf
| Modifier and Type | Method and Description |
|---|---|
boolean |
cd(java.lang.String remotePath)
Changes the current working directory.
|
boolean |
delete(java.lang.String fileName)
Remove a file from the remote host.
|
void |
disconnect()
Disconnects from the remote FTP server
|
boolean |
get(java.lang.String localFile,
java.lang.String remoteFile)
Copy the remote file to the local file.
|
java.lang.String |
getHost()
Returns the remote host
|
java.lang.String |
getLogin()
Returns the login name
|
java.lang.String |
getPassword()
Returns the login password
|
java.util.Date |
getTimestamp(java.lang.String remotePath)
Returns the timestamp of the given remote path.
|
java.lang.String[] |
listDirectories(java.lang.String remotePath)
Returns the list of directories in the given remote directory.
|
java.lang.String[] |
listFiles()
Returns the list of files in the current remote directory.
|
java.lang.String[] |
listFiles(java.lang.String remotePath)
Returns the list of files in the given remote directory.
|
boolean |
login(java.lang.String ip,
java.lang.String login,
java.lang.String password)
Logs into the remote host, using the given ip address, login name
and password.
|
boolean |
logout()
Logs out of the remote FTP server
|
boolean |
put(java.lang.String localFile,
java.lang.String remoteFile)
Copy the local file to the remote file.
|
java.lang.String |
pwd()
Returns the present working directory.
|
boolean |
rename(java.lang.String from,
java.lang.String to) |
void |
setAsciiFileType()
Sets the transfer file type to ASCII
|
void |
setBinaryFileType()
Sets the transfer file type to BINARY
|
boolean login(java.lang.String ip,
java.lang.String login,
java.lang.String password)
throws java.io.IOException
ip - remote ip addresslogin - login namepassword - login password
java.io.IOExceptionboolean logout()
throws java.io.IOException
java.io.IOExceptionvoid disconnect()
throws java.io.IOException
java.io.IOExceptionvoid setBinaryFileType()
void setAsciiFileType()
boolean get(java.lang.String localFile,
java.lang.String remoteFile)
throws java.io.IOException
localFile - Local file name.remoteFile - Remote file name.
java.io.IOExceptionboolean put(java.lang.String localFile,
java.lang.String remoteFile)
throws java.io.IOException
localFile - Local file name.remoteFile - Remote file name.
java.io.IOExceptionboolean delete(java.lang.String fileName)
throws java.io.IOException
fileName - remote file pathnamejava.io.IOExceptionjava.lang.String pwd()
throws java.io.IOException
java.io.IOExceptionboolean cd(java.lang.String remotePath)
throws java.io.IOException
remotePath - new remote directoryjava.io.IOExceptionjava.lang.String[] listFiles()
throws java.io.IOException
java.io.IOExceptionjava.lang.String[] listFiles(java.lang.String remotePath)
throws java.io.IOException
remotePath - remote directory to listjava.io.IOExceptionjava.lang.String[] listDirectories(java.lang.String remotePath)
throws java.io.IOException
remotePath - remote directory to listjava.io.IOExceptionjava.util.Date getTimestamp(java.lang.String remotePath)
throws java.io.IOException
remotePath - remote path for which to get timestampjava.io.IOExceptionboolean rename(java.lang.String from,
java.lang.String to)
throws java.io.IOException
java.io.IOExceptionjava.lang.String getPassword()
java.lang.String getHost()
java.lang.String getLogin()