Method Summary |
|
public void | cancelAllTransfers() |
public synchronized void | changeDirectory(String directoryName) Change directory on the FTP server. |
public synchronized void | changeToParentDirectory() Change to parent directory on the FTP server. |
protected void | checkConnection(boolean shouldBeConnected) Checks if the client has connected to the server and throws an exception if it hasn't. |
protected void | checkListingSettings() |
protected void | checkTransferSettings() |
protected void | configureClient() |
protected void | configureTransferType(FTPTransferType type) |
public synchronized void | connect() Make a connection to the FTP server. |
public synchronized void | createDirectory(String directoryName) Create directory on the FTP server. |
public synchronized void | deleteDirectory(String directoryName) Create directory on the FTP server. |
public synchronized void | deleteFile(String remoteFileName) Deletes a remote file. |
public synchronized FTPFile[] | directoryList() List the current directory on the FTP server. |
public synchronized FTPFile[] | directoryList(String directoryName) List a directory on the FTP server.
Parameters: directoryName - name of the directory (generally not a path). |
public synchronized String[] | directoryNameList() List the names of files and directories in the current directory on the FTP server. |
public synchronized String[] | directoryNameList(String directoryName, boolean isLongListing) List the names of files and directories of a directory on the FTP server.
Parameters: directoryName - name of the directory (generally not a path). |
public synchronized void | disconnect() Disconnect from the FTP server. |
public synchronized void | disconnect(boolean immediate) Disconnect from the FTP server. |
public synchronized byte[] | downloadByteArray(String remoteFileName) Download a file from the FTP server into a byte array. |
public synchronized void | downloadFile(String localFileName, String remoteFileName) Download a file from the FTP server . |
public synchronized void | downloadFile(String localFileName, String remoteFileName, WriteMode writeMode) Download a file from the FTP server . |
public synchronized FileTransferInputStream | downloadStream(String remoteFileName) Download a file from the FTP server as a stream. |
public synchronized String | executeCommand(String command) Request that the remote server execute the literal command supplied. |
public synchronized boolean | exists(String remoteFileName) Determine if a remote file exists. |
public synchronized AdvancedFTPSettings | getAdvancedFTPSettings() |
public synchronized FTPTransferType | getContentType() Get the current content type for all connections. |
public boolean | getDetectContentType() |
public synchronized Date | getModifiedTime(String remoteFileName) Get the modified-time of a remote file. |
public synchronized String | getPassword() Get the current user password. |
public synchronized String | getRemoteDirectory() Get the current remote directory. |
public synchronized String | getRemoteHost() Returns the IP address or name of the remote host. |
public synchronized int | getRemotePort() Returns the port being connected to on the remote server. |
public synchronized long | getSize(String remoteFileName) Get the size of a remote file. |
public synchronized FileStatistics | getStatistics() Get statistics on file transfers and deletions. |
public synchronized String | getSystemType() Get a string that represents the remote system that the client is logged
into. |
public synchronized int | getTimeout() Returns the timeout for socket connections. |
public synchronized String | getUserName() Get the current user name. |
public synchronized boolean | isConnected() |
public void | manualLogin() Perform a manual login using the credentials that have been set. |
public synchronized void | rename(String renameFromName, String renameToName) Rename a remote file or directory. |
public synchronized void | setContentType(FTPTransferType type) Set the transfer type for all connections, either ASCII or binary. |
public void | setDetectContentType(boolean detectContentType) Set auto detect of filetypes on or off. |
public synchronized void | setEventListener(EventListener listener) |
public synchronized void | setPassword(String password) Set the password of the user to log in with. |
public synchronized void | setRemoteHost(String remoteHost) Set the IP address or name of the remote host
This may only be done if the client is not already connected to the server. |
public synchronized void | setRemotePort(int remotePort) Set the port to connect to on the remote server. |
public synchronized void | setTimeout(int timeout) Set the timeout for socket connections. |
public synchronized void | setUserName(String userName) Set the name of the user to log in with. |
public synchronized String | uploadFile(String localFileName, String remoteFileName) Upload a file to the FTP server. |
public synchronized String | uploadFile(String localFileName, String remoteFileName, WriteMode writeMode) Upload a file to the FTP server. |
public synchronized FileTransferOutputStream | uploadStream(String remoteFileName) Upload a file to the FTP server by writing to a stream. |
public synchronized FileTransferOutputStream | uploadStream(String remoteFileName, WriteMode writeMode) Upload a file to the FTP server by writing to a stream. |