com.jscape.filetransfer

## Class FtpTransfer

- java.lang.Object
- - com.jscape.filetransfer.FtpTransfer

- All Implemented Interfaces:
    FileTransfer, java.lang.AutoCloseable

      public class FtpTransfer
      extends java.lang.Object
      implements FileTransfer

  Implements the basic functionality of a FTP client.

  Example Usage:

        // create new FtpTransfer instance
        FileTransfer ftp = new FtpTransfer("ftp.myserver.com","anonymous","user@myserver.com");
        try {
        // connect to FTP server
        ftp.connect();
        <p/>
        // print out directory listing
        System.out.println(ftp.getDirListingAsString());
        <p/>
        // disconnect from FTP server
        ftp.disconnect();
        } catch(Exception e) {
        System.out.println(e);
        }

- - ### Field Summary

    - ### Fields inherited from interface com.jscape.filetransfer.FileTransfer

      `ASCII, AUTO, BINARY, CURRENT_DIRECTORY, PARENT_DIRECTORY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FtpTransfer()` Creates FtpTransfer instance.
    `FtpTransfer(java.lang.String host, int port, java.lang.String user, java.lang.String password, java.io.File localDirectory, java.util.Set<FileTransferListener> listeners)`
    `FtpTransfer(java.lang.String host, java.lang.String user, java.lang.String pwd)` Creates FtpTransfer instance.
    `FtpTransfer(java.lang.String host, java.lang.String user, java.lang.String pwd, java.io.File localDirectory)` Creates FtpTransfer instance.
    `FtpTransfer(java.lang.String host, java.lang.String user, java.lang.String pwd, int port)` Creates FtpTransfer instance.
    `FtpTransfer(java.lang.String host, java.lang.String user, java.lang.String pwd, java.lang.Integer port)` Creates FtpTransfer instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `abortDownloadThread(java.lang.String remoteFile)` Abort download thread.
    `void` | `abortDownloadThreads()` Abort all download threads.
    `void` | `abortUploadThread(java.lang.String remoteFile)` Abort upload thread.
    `void` | `abortUploadThreads()` Abort all upload threads.
    `void` | `addFileTransferListener(FileTransferListener listener)` See FileTransfer interface for method description.
    `void` | `changePassword(java.lang.String oldPassword, java.lang.String newPassword)` Changes the password.
    `void` | `checksum(java.io.File localFile, java.lang.String remoteFile)`
    `void` | `clearProxySettings()` Clears proxy server values.
    `void` | `close()`
    `FtpTransfer` | `connect()` Connects to server and performs login.
    `void` | `connect(boolean login)` Establishes a connection with FTP server with optional login
    `FileTransfer` | `copy()` Returns a copy of current transfer instance with same listeners.
    `void` | `deleteDir(java.lang.String name)` See FileTransfer interface for method description.
    `void` | `deleteDir(java.lang.String name, boolean recursive)` See FileTransfer interface for method description.
    `void` | `deleteFile(java.lang.String remoteFile)` See FileTransfer interface for method description.
    `void` | `disconnect()` See FileTransfer interface for method description.
    `void` | `download(java.io.OutputStream out, java.lang.String remoteFile)` See FileTransfer interface for method description.
    `java.io.File` | `download(java.lang.String remoteFile)` See FileTransfer interface for method description.
    `java.io.File` | `download(java.lang.String localFile, java.lang.String remoteFile)` See FileTransfer interface for method description.
    `void` | `downloadDir(java.lang.String remoteDir)` See FileTransfer interface for method description.
    `void` | `downloadDir(java.lang.String remoteDir, int retryLimit, boolean performChecksum)` Downloads remote directory and contents.
    `void` | `downloadDir(java.lang.String remoteDir, int retryLimit, boolean performChecksum, int threadCount)` Downloads remote directory and contents.
    `boolean` | `exists(java.lang.String path)` Checks if the specified path exists on the remote server.
    `int` | `getBlockTransferSize()` Gets blocksize for use in transferring files.
    `boolean` | `getDebug()` See FileTransfer interface for method description.
    `java.io.PrintStream` | `getDebugStream()` See FileTransfer interface for method description.
    `java.lang.String` | `getDir()` See FileTransfer interface for method description.
    `java.util.Enumeration<FileTransferRemoteFile>` | `getDirListing()` See FileTransfer interface for method description.
    `java.util.Enumeration<FileTransferRemoteFile>` | `getDirListing(java.lang.String filter)` See FileTransfer interface for method description.
    `java.lang.String` | `getDirListingAsString()` See FileTransfer interface for method description.
    `java.lang.String` | `getDirListingAsString(java.lang.String filter)` See FileTransfer interface for method description.
    `boolean` | `getErrorOnSizeCommand()` Gets the error on size command indicator.
    `long` | `getFilesize(java.lang.String remoteFile)` See FileTransfer interface for method description.
    `java.util.Date` | `getFileTimestamp(java.lang.String remoteFile)` See FileTransfer interface for method description.
    `java.lang.String` | `getHostname()` See FileTransfer interface for method description.
    `java.lang.Object` | `getImplementation()` See FileTransfer interface for method description.
    `java.io.InputStream` | `getInputStream(java.lang.String remoteFile, long pos)` See FileTransfer interface for method description.
    `java.lang.String` | `getLocalChecksum(java.io.File localFile)` Returns local checksum.
    `java.io.File` | `getLocalDir()` See FileTransfer interface for method description.
    `java.util.Enumeration` | `getLocalDirListing()` See FileTransfer interface for method description.
    `int` | `getMode()` See FileTransfer interface for method description.
    `java.util.Enumeration` | `getNameListing()` See FileTransfer interface for method description.
    `java.util.Enumeration` | `getNameListing(java.lang.String filter)` See FileTransfer interface for method description.
    `java.io.OutputStream` | `getOutputStream(java.lang.String fileName, long off)` See FileTransfer interface for method description.
    `boolean` | `getPassive()` See FileTransfer interface for method description.
    `java.lang.String` | `getPassword()` See FileTransfer interface for method description.
    `boolean` | `getPerformMLSDListing()` Get MLSD directory listing.
    `int` | `getPort()` See FileTransfer interface for method description.
    `int` | `getRecursiveDirectoryFileCount(java.lang.String directory)` Get recursive directory file count.
    `long` | `getRecursiveDirectorySize(java.lang.String directory)` Get recursive directory size.
    `java.lang.String` | `getRemoteFileChecksum(java.lang.String remoteFile)` Returns remote file checksum.
    `java.util.Vector<FileTransferRemoteFile>` | `getRemoteFileList(java.lang.String remoteDirectory)` Get remote directory list.
    `boolean` | `getTcpNoDelay()`
    `long` | `getTimeout()` See FileTransfer interface for method description.
    `boolean` | `getUseEPSV()` Gets use EPSV value.
    `java.lang.String` | `getUsername()` See FileTransfer interface for method description.
    `java.lang.String` | `getWireEncoding()` Gets encoding set used when issuing commands and transferring files
    `void` | `interrupt()` See FileTransfer interface for method description.
    `boolean` | `interrupted()` See FileTransfer interface for method description.
    `boolean` | `isChecksumVerificationRequired()`
    `boolean` | `isConnected()` See FileTransfer interface for method description.
    `boolean` | `isDirectory(java.lang.String remotePath)`
    `boolean` | `isFeatureSupported(java.lang.String command)`
    `void` | `issueCommand(java.lang.String command)` Issues command to the server.
    `void` | `login()` Logs into FTP server after establishing a connection.
    `void` | `makeDir(java.lang.String name)` See FileTransfer interface for method description.
    `void` | `makeDirRecursive(java.lang.String name)` See FileTransfer interface for method description.
    `java.io.File` | `makeLocalDir(java.lang.String name)` See FileTransfer interface for method description.
    `void` | `mdelete(java.lang.String filter)` Deletes multiple files matching filter to FTP server's current directory.
    `void` | `mdownload(java.util.Enumeration fileNames)` See FileTransfer interface for method description.
    `void` | `mdownload(java.lang.String filter)` See FileTransfer interface for method description.
    `void` | `mupload(java.util.Enumeration fileNames)` See FileTransfer interface for method description.
    `void` | `mupload(java.lang.String filter)` See FileTransfer interface for method description.
    `void` | `removeFileTransferListener(FileTransferListener listener)` See FileTransfer interface for method description.
    `void` | `renameFile(java.lang.String remoteFile, java.lang.String newFile)` See FileTransfer interface for method description.
    `void` | `reset()` See FileTransfer interface for method description.
    `void` | `resumeDownload(java.io.OutputStream out, java.lang.String remoteFile, long remoteFileOffset)`
    `void` | `resumeDownload(java.lang.String remoteFile, long offset)` See FileTransfer interface for method description.
    `void` | `resumeDownload(java.lang.String localFile, java.lang.String remoteFile, long offset)` See FileTransfer interface for method description.
    `void` | `resumeUpload(java.io.File file, long offset)` See FileTransfer interface for method description.
    `void` | `resumeUpload(java.io.File localFile, java.lang.String remoteFile, long localFileOffset)` Resume upload of file to server.
    `void` | `resumeUpload(java.io.InputStream in, long length, java.lang.String remoteFile, long remoteFileOffset)`
    `void` | `resumeUpload(java.lang.String file, long offset)` See FileTransfer interface for method description.
    `boolean` | `sameChecksum(java.io.File localFile, java.lang.String remoteFile)` Checks a checksum equality of local and remote files.
    `FileTransfer` | `setAscii()` See FileTransfer interface for method description.
    `FileTransfer` | `setAuto(boolean auto)` See FileTransfer interface for method description.
    `FtpTransfer` | `setAutoDetectIpv6(boolean autoDetect)` Set auto detect Ipv6.
    `FileTransfer` | `setBinary()` See FileTransfer interface for method description.
    `FileTransfer` | `setBlockTransferSize(int blocksize)` Sets block size for use in transferring files.
    `FileTransfer` | `setChecksumVerificationRequired(boolean value)`
    `FtpTransfer` | `setCompression(boolean compression)` Sets whether the data will be compressed during the transfering.
    `FtpTransfer` | `setConnectBeforeCommand(boolean before)` Sets the connectBefore property value
    `FileTransfer` | `setDebug(boolean debug)` See FileTransfer interface for method description.
    `FileTransfer` | `setDebugStream(java.io.PrintStream ps)` See FileTransfer interface for method description.
    `FileTransfer` | `setDir(java.lang.String name)` See FileTransfer interface for method description.
    `FileTransfer` | `setDirUp()` See FileTransfer interface for method description.
    `FtpTransfer` | `setErrorOnSizeCommand(boolean error)` Sets the indicator value which will be used by methods that invokes getFileSize.
    `FileTransfer` | `setFileModificationTime(java.lang.String remoteFile, java.util.Date dateFile)` Set modification time.
    `FileTransfer` | `setFileTimestamp(java.lang.String remoteFile, java.util.Date timestamp)` See FileTransfer interface for method description.
    `FileTransfer` | `setHostname(java.lang.String host)` See FileTransfer interface for method description.
    `FileTransfer` | `setLocalDir(java.io.File dir)` See FileTransfer interface for method description.
    `FtpTransfer` | `setNATAddress(java.lang.String ipAddress)` Sets a NAT address which will be used after PASV command.
    `FileTransfer` | `setPassive(boolean passive)` See FileTransfer interface for method description.
    `FileTransfer` | `setPassword(java.lang.String password)` See FileTransfer interface for method description.
    `FtpTransfer` | `setPerformMLSDListing(boolean mlsdListing)` Set MLSD directory listing.
    `FileTransfer` | `setPort(int port)` See FileTransfer interface for method description.
    `FileTransfer` | `setPreserveFileDownloadTimestamp(boolean value)` Set preserve file download timestamps.
    `FileTransfer` | `setPreserveFileUploadTimestamp(boolean value)` Get preserve file upload timestamps.
    `FileTransfer` | `setProxyAuthentication(java.lang.String proxyUsername, java.lang.String proxyPassword)` Sets the proxy authentication username and password to use with proxy server.
    `FileTransfer` | `setProxyHost(java.lang.String proxyHostname, int proxyPort)` Sets the proxy hostname and port for this connection.
    `FileTransfer` | `setProxyType(java.lang.String proxyType)` Sets the proxy type will be used for this connection.
    `FtpTransfer` | `setTcpNoDelay(boolean value)`
    `FileTransfer` | `setTimeout(long timeout)` See FileTransfer interface for method description.
    `FileTransfer` | `setTimeZone(java.util.TimeZone timeZone)` Set the timezone, used for preserving timestamps.
    `FtpTransfer` | `setUseEPRT(boolean useEPRT)` Sets use EPRT indicator.
    `FtpTransfer` | `setUseEPSV(boolean useEPSV)` Sets use EPSV indicator.
    `void` | `setUseExtendedDirectoryListing(boolean useExtendedDirectoryListing)` Sets the use extended directory listing field.
    `FileTransfer` | `setUsername(java.lang.String username)` See FileTransfer interface for method description.
    `FileTransfer` | `setWireEncoding(java.lang.String encoding)` Sets encoding set used when issuing commands and transferring files.
    `void` | `upload(byte[] data, java.lang.String name)` See FileTransfer interface for method description.
    `void` | `upload(byte[] data, java.lang.String name, boolean append)` See FileTransfer interface for method description.
    `void` | `upload(java.io.File file)` See FileTransfer interface for method description.
    `void` | `upload(java.io.File file, boolean append)` See FileTransfer interface for method description.
    `void` | `upload(java.io.File file, java.lang.String remoteName)` See FileTransfer interface for method description.
    `void` | `upload(java.io.File file, java.lang.String remoteName, boolean append)` See FileTransfer interface for method description.
    `void` | `upload(java.io.InputStream in, long length, java.lang.String remoteFile, boolean shouldAppend)`
    `void` | `upload(java.lang.String name)` See FileTransfer interface for method description.
    `void` | `upload(java.lang.String name, boolean append)` See FileTransfer interface for method description.
    `void` | `upload(java.lang.String extension, java.io.File file)` Uploads a file to server with the extension specified by the argument.
    `void` | `upload(java.lang.String name, java.lang.String remoteName)` See FileTransfer interface for method description.
    `void` | `upload(java.lang.String name, java.lang.String remoteName, boolean append)` See FileTransfer interface for method description.
    `void` | `uploadDir(java.io.File localDir)` See FileTransfer interface for method description.
    `void` | `uploadDir(java.io.File localDir, int retryLimit, boolean performChecksum, java.lang.String extension)` Uploads local directory and contents.
    `void` | `uploadDir(java.io.File localDir, int retryLimit, boolean performChecksum, java.lang.String extension, int threadCount)` Uploads local directory and contents.
    `void` | `uploadDir(java.io.File localDir, int retryLimit, int retryInterval, boolean performChecksum, java.lang.String extension)` Uploads local directory and contents.
    `void` | `uploadDir(java.io.File localDir, java.lang.String extension)` Uploads local directory and contents recursively to server.
    `java.lang.String` | `uploadUnique(java.io.File file)` See FileTransfer interface for method description.
    `java.lang.String` | `uploadUnique(java.io.InputStream in, java.lang.String remoteFilePrefix)` See FileTransfer interface for method description.
    `java.lang.String` | `uploadUnique(java.lang.String fileName)` See FileTransfer interface for method description.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FtpTransfer

          public FtpTransfer(java.lang.String host,
                             int port,
                             java.lang.String user,
                             java.lang.String password,
                             java.io.File localDirectory,
                             java.util.Set<FileTransferListener> listeners)

    - #### FtpTransfer

          public FtpTransfer(java.lang.String host,
                             java.lang.String user,
                             java.lang.String pwd,
                             java.io.File localDirectory)

      Creates FtpTransfer instance.
      Parameters:
        `host` - the hostname of FTP server
        `user` - the username of FTP user
        `pwd` - the password of FTP user
        `localDirectory` - the local directory to be used for uploading / downloading files

    - #### FtpTransfer

          public FtpTransfer(java.lang.String host,
                             java.lang.String user,
                             java.lang.String pwd,
                             int port)

      Creates FtpTransfer instance.
      Parameters:
        `host` - the hostname of FTP server
        `user` - the username of FTP user
        `pwd` - the password of FTP user
        `port` - the port of FTP server

    - #### FtpTransfer

          public FtpTransfer(java.lang.String host,
                             java.lang.String user,
                             java.lang.String pwd,
                             java.lang.Integer port)

      Creates FtpTransfer instance.
      Parameters:
        `host` - the hostname of FTP server
        `user` - the username of FTP user
        `pwd` - the password of FTP user
        `port` - the port of FTP server

    - #### FtpTransfer

          public FtpTransfer(java.lang.String host,
                             java.lang.String user,
                             java.lang.String pwd)

      Creates FtpTransfer instance.
      Parameters:
        `host` - the hostname of FTP server
        `user` - the username of FTP user
        `pwd` - the password of FTP user

    - #### FtpTransfer

          public FtpTransfer()

      Creates FtpTransfer instance.

  - ### Method Detail

    - #### connect

          public FtpTransfer connect()
                              throws FileTransferException

      Description copied from interface: `FileTransfer`
      Connects to server and performs login.
      Specified by:
        `connect` in interface `FileTransfer`
      Throws:
        `FileTransferException` - FileTransferException instance
      See Also:
        `FileTransfer.setUsername(java.lang.String)`, `FileTransfer.setPassword(java.lang.String)`

    - #### connect

          public void connect(boolean login)
                       throws FileTransferException

      Establishes a connection with FTP server with optional login
      Parameters:
        `login` - true to login, false otherwise
      Throws:
        `FileTransferException`

    - #### login

          public void login()
                     throws FileTransferException

      Logs into FTP server after establishing a connection. This method should only be used if login is not performed automatically during connect.
      Throws:
        `FileTransferException` - if an I/O or protocol error occurs

    - #### setPreserveFileUploadTimestamp

          public FileTransfer setPreserveFileUploadTimestamp(boolean value)

      Description copied from interface: `FileTransfer`
      Get preserve file upload timestamps.
      Specified by:
        `setPreserveFileUploadTimestamp` in interface `FileTransfer`

    - #### setPreserveFileDownloadTimestamp

          public FileTransfer setPreserveFileDownloadTimestamp(boolean value)

      Description copied from interface: `FileTransfer`
      Set preserve file download timestamps.
      Specified by:
        `setPreserveFileDownloadTimestamp` in interface `FileTransfer`

    - #### isChecksumVerificationRequired

          public boolean isChecksumVerificationRequired()

      Specified by:
        `isChecksumVerificationRequired` in interface `FileTransfer`

    - #### setChecksumVerificationRequired

          public FileTransfer setChecksumVerificationRequired(boolean value)

      Specified by:
        `setChecksumVerificationRequired` in interface `FileTransfer`

    - #### setTimeZone

          public FileTransfer setTimeZone(java.util.TimeZone timeZone)

      Description copied from interface: `FileTransfer`
      Set the timezone, used for preserving timestamps.
      Specified by:
        `setTimeZone` in interface `FileTransfer`

    - #### issueCommand

          public void issueCommand(java.lang.String command)
                            throws FileTransferException

      Issues command to the server.
      Parameters:
        `command` - a command
      Throws:
        `FileTransferException` - if an error occurs

    - #### changePassword

          public void changePassword(java.lang.String oldPassword,
                                     java.lang.String newPassword)
                              throws FileTransferException

      Changes the password.
      Parameters:
        `oldPassword` - the old password.
        `newPassword` - the new password.
      Throws:
        `FileTransferException` - if I/O or protocol error occurs.

    - #### deleteDir

          public void deleteDir(java.lang.String name)
                         throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `deleteDir` in interface `FileTransfer`
      Parameters:
        `name` - the directory to remove
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.deleteDir(String)`

    - #### deleteDir

          public void deleteDir(java.lang.String name,
                                boolean recursive)
                         throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `deleteDir` in interface `FileTransfer`
      Parameters:
        `name` - the directory to remove
        `recursive` - `true` if it should delete files and subdirectories within directory
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.deleteDir(String, boolean)`

    - #### exists

          public boolean exists(java.lang.String path)
                         throws FileTransferException

      Description copied from interface: `FileTransfer`
      Checks if the specified path exists on the remote server.
      Specified by:
        `exists` in interface `FileTransfer`
      Parameters:
        `path` - a path to verify
      Returns:
        `true` if path exists; `false` otherwise
      Throws:
        `FileTransferException` - if an error occurs

    - #### deleteFile

          public void deleteFile(java.lang.String remoteFile)
                          throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `deleteFile` in interface `FileTransfer`
      Parameters:
        `remoteFile` - name of file to delete
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.deleteFile(String)`

    - #### disconnect

          public void disconnect()
                          throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `disconnect` in interface `FileTransfer`
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.disconnect()`

    - #### close

          public void close()

      Specified by:
        `close` in interface `FileTransfer`
      Specified by:
        `close` in interface `java.lang.AutoCloseable`

    - #### download

          public void download(java.io.OutputStream out,
                               java.lang.String remoteFile)
                        throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `download` in interface `FileTransfer`
      Parameters:
        `out` - the OutputStream to write download to
        `remoteFile` - remote filename
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.download(OutputStream, String)`

    - #### download

          public java.io.File download(java.lang.String remoteFile)
                                throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `download` in interface `FileTransfer`
      Parameters:
        `remoteFile` - the file to download
      Returns:
        File the file downloaded
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.download(String)`

    - #### download

          public java.io.File download(java.lang.String localFile,
                                       java.lang.String remoteFile)
                                throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `download` in interface `FileTransfer`
      Parameters:
        `localFile` - destination filename
        `remoteFile` - remote filename
      Returns:
        File the file downloaded
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.download(String, String)`

    - #### downloadDir

          public void downloadDir(java.lang.String remoteDir)
                           throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `downloadDir` in interface `FileTransfer`
      Parameters:
        `remoteDir` - the directory to download
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.downloadDir(String)`

    - #### downloadDir

          public void downloadDir(java.lang.String remoteDir,
                                  int retryLimit,
                                  boolean performChecksum)
                           throws FileTransferException

      Downloads remote directory and contents. Downloads are stored relative to current local directory.
      Specified by:
        `downloadDir` in interface `FileTransfer`
      Parameters:
        `remoteDir` - the directory to download
        `retryLimit` - Retry number when an error occurs
        `performChecksum` - Checksum perform indicator
      Throws:
        `FtpException` - if an I/O or protocol error occurs.
        `FileTransferException` - if an I/O or protocol error occurs.

    - #### getDebug

          public boolean getDebug()

      See FileTransfer interface for method description.
      Specified by:
        `getDebug` in interface `FileTransfer`
      Returns:
        `true` if debugging is on
      See Also:
        `FileTransfer.getDebug()`

    - #### getDebugStream

          public java.io.PrintStream getDebugStream()

      See FileTransfer interface for method description.
      Specified by:
        `getDebugStream` in interface `FileTransfer`
      Returns:
        the `PrintStream` used in reporting debug statements
      See Also:
        `FileTransfer.getDebugStream()`

    - #### getDir

          public java.lang.String getDir()
                                  throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `getDir` in interface `FileTransfer`
      Returns:
        current directory
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.getDir()`

    - #### getPerformMLSDListing

          public boolean getPerformMLSDListing()

      Get MLSD directory listing.
      Returns:
        boolean value

    - #### setPerformMLSDListing

          public FtpTransfer setPerformMLSDListing(boolean mlsdListing)

      Set MLSD directory listing.
      Parameters:
        `mlsdListing` - - boolean value

    - #### getDirListing

          public java.util.Enumeration<FileTransferRemoteFile> getDirListing()
                                                                      throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `getDirListing` in interface `FileTransfer`
      Returns:
        an `Enumeration` of `FileTransferRemoteFile` objects
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.getDirListing()`

    - #### getDirListing

          public java.util.Enumeration<FileTransferRemoteFile> getDirListing(java.lang.String filter)
                                                                      throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `getDirListing` in interface `FileTransfer`
      Parameters:
        `filter` - the filename filter
      Returns:
        an `Enumeration` of `FileTransferRemoteFile` objects
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.getDirListing(String)`

    - #### getDirListingAsString

          public java.lang.String getDirListingAsString()
                                                 throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `getDirListingAsString` in interface `FileTransfer`
      Returns:
        a directory listing
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.getDirListingAsString()`

    - #### getDirListingAsString

          public java.lang.String getDirListingAsString(java.lang.String filter)
                                                 throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `getDirListingAsString` in interface `FileTransfer`
      Parameters:
        `filter` - a filename filter
      Returns:
        a directory listing
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.getDirListingAsString(String)`

    - #### isDirectory

          public boolean isDirectory(java.lang.String remotePath)
                              throws FileTransferException

      Specified by:
        `isDirectory` in interface `FileTransfer`
      Throws:
        `FileTransferException`

    - #### getFilesize

          public long getFilesize(java.lang.String remoteFile)
                           throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `getFilesize` in interface `FileTransfer`
      Parameters:
        `remoteFile` - the remote file
      Returns:
        filesize in bytes
      Throws:
        `FileTransferException` - if an I/O or protocol error occurs.
      See Also:
        `FileTransfer.getFilesize(String)`

    - #### getFileTimestamp

          public java.util.Date getFileTimestamp(java.lang.String remoteFile)
                                          throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `getFileTimestamp` in interface `FileTransfer`
      Parameters:
        `remoteFile` - the remote file
      Returns:
        date the date/timestamp of remote file
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.getFileTimestamp(String)`

    - #### setFileTimestamp

          public FileTransfer setFileTimestamp(java.lang.String remoteFile,
                                               java.util.Date timestamp)
                                        throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `setFileTimestamp` in interface `FileTransfer`
      Parameters:
        `remoteFile` - the remote file
        `timestamp` - the new date/timestamp
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.setFileTimestamp(String, Date)`

    - #### setFileModificationTime

          public FileTransfer setFileModificationTime(java.lang.String remoteFile,
                                                      java.util.Date dateFile)
                                               throws FileTransferException

      Set modification time.
      Specified by:
        `setFileModificationTime` in interface `FileTransfer`
      Parameters:
        `remoteFile` - - the remote file.
        `dateFile` - - the time.
      Throws:
        `FileTransferException`

    - #### sameChecksum

          public boolean sameChecksum(java.io.File localFile,
                                      java.lang.String remoteFile)
                               throws FileTransferException

      Description copied from interface: `FileTransfer`
      Checks a checksum equality of local and remote files.
      Specified by:
        `sameChecksum` in interface `FileTransfer`
      Parameters:
        `localFile` - a local file
        `remoteFile` - a remote file
      Returns:
        `true` if checksums are equal; `false` otherwise
      Throws:
        `FileTransferException` - if an error occurs

    - #### getHostname

          public java.lang.String getHostname()

      See FileTransfer interface for method description.
      Specified by:
        `getHostname` in interface `FileTransfer`
      Returns:
        hostname
      See Also:
        `FileTransfer.getHostname()`

    - #### getLocalDir

          public java.io.File getLocalDir()

      See FileTransfer interface for method description.
      Specified by:
        `getLocalDir` in interface `FileTransfer`
      Returns:
        the local directory
      See Also:
        `FileTransfer.getLocalDir()`

    - #### getLocalDirListing

          public java.util.Enumeration getLocalDirListing()

      See FileTransfer interface for method description.
      Specified by:
        `getLocalDirListing` in interface `FileTransfer`
      Returns:
        an `java.util.Enumeration` of `File`
      See Also:
        `FileTransfer.getLocalDirListing()`

    - #### getMode

          public int getMode()

      See FileTransfer interface for method description.
      Specified by:
        `getMode` in interface `FileTransfer`
      Returns:
        the data transfer mode
      See Also:
        `FileTransfer.getMode()`

    - #### getNameListing

          public java.util.Enumeration getNameListing()
                                               throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `getNameListing` in interface `FileTransfer`
      Returns:
        an `Enumeration` of `String` where each item represents a file or directory name
      Throws:
        `FileTransferException` - if an I/O or server related error occurs
      See Also:
        `FileTransfer.getNameListing()`

    - #### getNameListing

          public java.util.Enumeration getNameListing(java.lang.String filter)
                                               throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `getNameListing` in interface `FileTransfer`
      Parameters:
        `filter` - the filename filter
      Returns:
        an `Enumeration` of `String` where each item represents a file or directory name
      Throws:
        `FileTransferException` - if an I/O or server related error occurs
      See Also:
        `FileTransfer.getNameListing(String)`

    - #### getPassive

          public boolean getPassive()

      See FileTransfer interface for method description.
      Specified by:
        `getPassive` in interface `FileTransfer`
      Returns:
        `true` if passive mode is used, `false` otherwise
      See Also:
        `FileTransfer.getPassive()`

    - #### getPassword

          public java.lang.String getPassword()

      See FileTransfer interface for method description.
      Specified by:
        `getPassword` in interface `FileTransfer`
      Returns:
        the password
      See Also:
        `FileTransfer.getPassword()`

    - #### getPort

          public int getPort()

      See FileTransfer interface for method description.
      Specified by:
        `getPort` in interface `FileTransfer`
      Returns:
        server port
      See Also:
        `FileTransfer.getPort()`

    - #### getTimeout

          public long getTimeout()

      See FileTransfer interface for method description.
      Specified by:
        `getTimeout` in interface `FileTransfer`
      Returns:
        timeout in milliseconds
      See Also:
        `FileTransfer.getTimeout()`

    - #### getUsername

          public java.lang.String getUsername()

      See FileTransfer interface for method description.
      Specified by:
        `getUsername` in interface `FileTransfer`
      Returns:
        username
      See Also:
        `FileTransfer.getUsername()`

    - #### interrupt

          public void interrupt()

      See FileTransfer interface for method description.
      Specified by:
        `interrupt` in interface `FileTransfer`
      See Also:
        `FileTransfer.interrupt()`

    - #### interrupted

          public boolean interrupted()

      See FileTransfer interface for method description.
      Specified by:
        `interrupted` in interface `FileTransfer`
      Returns:
        `true` if transfer process was interrupted.
      See Also:
        `FileTransfer.interrupted()`

    - #### isConnected

          public boolean isConnected()

      See FileTransfer interface for method description.
      Specified by:
        `isConnected` in interface `FileTransfer`
      Returns:
        `true` if connected `false` otherwise
      See Also:
        `FileTransfer.isConnected()`

    - #### makeDir

          public void makeDir(java.lang.String name)
                       throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `makeDir` in interface `FileTransfer`
      Parameters:
        `name` - name of directory to make
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.makeDir(String)`

    - #### makeDirRecursive

          public void makeDirRecursive(java.lang.String name)
                                throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `makeDirRecursive` in interface `FileTransfer`
      Parameters:
        `name` - full path of directory to make
      Throws:
        `FileTransferException` - if an I/O or server error occurs
      See Also:
        `FileTransfer.makeDirRecursive(String)`

    - #### mdelete

          public void mdelete(java.lang.String filter)
                       throws FileTransferException

      Deletes multiple files matching filter to FTP server's current directory. Wildcards may be used to specify multiple files e.g. .*\.txt
      Specified by:
        `mdelete` in interface `FileTransfer`
      Parameters:
        `filter` - the regular expression filter to use
      Throws:
        `FileTransferException` - if an I/O or protocol error occurs.

    - #### makeLocalDir

          public java.io.File makeLocalDir(java.lang.String name)

      See FileTransfer interface for method description.
      Specified by:
        `makeLocalDir` in interface `FileTransfer`
      Parameters:
        `name` - name of directory
      Returns:
        the directory
      See Also:
        `FileTransfer.makeLocalDir(String)`

    - #### mdownload

          public void mdownload(java.util.Enumeration fileNames)
                         throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `mdownload` in interface `FileTransfer`
      Parameters:
        `fileNames` - filenames of files to download
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.mdownload(Enumeration)`

    - #### mdownload

          public void mdownload(java.lang.String filter)
                         throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `mdownload` in interface `FileTransfer`
      Parameters:
        `filter` - the regular expression to use
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.mdownload(String)`

    - #### mupload

          public void mupload(java.util.Enumeration fileNames)
                       throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `mupload` in interface `FileTransfer`
      Parameters:
        `fileNames` - filenames of files to upload
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.mupload(Enumeration)`

    - #### mupload

          public void mupload(java.lang.String filter)
                       throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `mupload` in interface `FileTransfer`
      Parameters:
        `filter` - the regular expression to use
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.mupload(String)`

    - #### renameFile

          public void renameFile(java.lang.String remoteFile,
                                 java.lang.String newFile)
                          throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `renameFile` in interface `FileTransfer`
      Parameters:
        `remoteFile` - name of file to rename
        `newFile` - new name of file
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.renameFile(String, String)`

    - #### reset

          public void reset()

      See FileTransfer interface for method description.
      Specified by:
        `reset` in interface `FileTransfer`
      See Also:
        `FileTransfer.reset()`

    - #### resumeDownload

          public void resumeDownload(java.lang.String remoteFile,
                                     long offset)
                              throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `resumeDownload` in interface `FileTransfer`
      Parameters:
        `remoteFile` - the file to download
        `offset` - file offset in bytes
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.resumeDownload(String, long)`

    - #### resumeDownload

          public void resumeDownload(java.lang.String localFile,
                                     java.lang.String remoteFile,
                                     long offset)
                              throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `resumeDownload` in interface `FileTransfer`
      Parameters:
        `localFile` - local file name
        `remoteFile` - the file to download
        `offset` - file offset in bytes
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.resumeDownload(String, String, long)`

    - #### resumeUpload

          public void resumeUpload(java.io.File file,
                                   long offset)
                            throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `resumeUpload` in interface `FileTransfer`
      Parameters:
        `file` - the local file to upload
        `offset` - file offset in bytes
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.resumeUpload(File, long)`

    - #### resumeUpload

          public void resumeUpload(java.lang.String file,
                                   long offset)
                            throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `resumeUpload` in interface `FileTransfer`
      Parameters:
        `file` - the local file to upload
        `offset` - file offset in bytes
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.resumeUpload(String, long)`

    - #### setAscii

          public FileTransfer setAscii()

      See FileTransfer interface for method description.
      Specified by:
        `setAscii` in interface `FileTransfer`
      See Also:
        `FileTransfer.setAscii()`

    - #### setAuto

          public FileTransfer setAuto(boolean auto)

      See FileTransfer interface for method description.
      Specified by:
        `setAuto` in interface `FileTransfer`
      Parameters:
        `auto` - `true` to turn automatic detect on `false` to turn off
      See Also:
        `FileTransfer.setAuto(boolean)`

    - #### setBinary

          public FileTransfer setBinary()

      See FileTransfer interface for method description.
      Specified by:
        `setBinary` in interface `FileTransfer`
      See Also:
        `FileTransfer.setBinary()`

    - #### setDebug

          public FileTransfer setDebug(boolean debug)

      See FileTransfer interface for method description.
      Specified by:
        `setDebug` in interface `FileTransfer`
      Parameters:
        `debug` - `true` to turn debugging on
      See Also:
        `FileTransfer.setDebug(boolean)`

    - #### setDebugStream

          public FileTransfer setDebugStream(java.io.PrintStream ps)

      See FileTransfer interface for method description.
      Specified by:
        `setDebugStream` in interface `FileTransfer`
      Parameters:
        `ps` - the `PrintStream` to send debug statements to
      See Also:
        `FileTransfer.setDebugStream(PrintStream)`

    - #### setDir

          public FileTransfer setDir(java.lang.String name)
                              throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `setDir` in interface `FileTransfer`
      Parameters:
        `name` - the remote directory
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.setDir(String)`

    - #### setDirUp

          public FileTransfer setDirUp()
                                throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `setDirUp` in interface `FileTransfer`
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.setDirUp()`

    - #### setHostname

          public FileTransfer setHostname(java.lang.String host)

      See FileTransfer interface for method description.
      Specified by:
        `setHostname` in interface `FileTransfer`
      Parameters:
        `host` - the hostname or IP address of server
      See Also:
        `FileTransfer.setHostname(String)`

    - #### getTcpNoDelay

          public boolean getTcpNoDelay()

    - #### setTcpNoDelay

          public FtpTransfer setTcpNoDelay(boolean value)

    - #### setLocalDir

          public FileTransfer setLocalDir(java.io.File dir)

      See FileTransfer interface for method description.
      Specified by:
        `setLocalDir` in interface `FileTransfer`
      Parameters:
        `dir` - the local directory
      See Also:
        `FileTransfer.setLocalDir(File)`

    - #### setErrorOnSizeCommand

          public FtpTransfer setErrorOnSizeCommand(boolean error)

      Sets the indicator value which will be used by methods that invokes getFileSize.
      Parameters:
        `error` - Error indicator value

    - #### getErrorOnSizeCommand

          public boolean getErrorOnSizeCommand()

      Gets the error on size command indicator.
      Returns:
        `true` then method which invokes getFileSize will throw an exception when it caused an error, `false` the error will be ignored.

    - #### setNATAddress

          public FtpTransfer setNATAddress(java.lang.String ipAddress)
                                    throws FileTransferException

      Sets a NAT address which will be used after PASV command.
      Parameters:
        `ipAddress` - The NAT IP address.
      Throws:
        `FtpException` - If an error occurs.
        `FileTransferException`

    - #### setPassive

          public FileTransfer setPassive(boolean passive)

      See FileTransfer interface for method description.
      Specified by:
        `setPassive` in interface `FileTransfer`
      Parameters:
        `passive` - if true, the transfers will be passive.
      See Also:
        `FileTransfer.setPassive(boolean)`

    - #### setPassword

          public FileTransfer setPassword(java.lang.String password)

      See FileTransfer interface for method description.
      Specified by:
        `setPassword` in interface `FileTransfer`
      Parameters:
        `password` - the password
      See Also:
        `FileTransfer.setPassword(String)`

    - #### setProxyAuthentication

          public FileTransfer setProxyAuthentication(java.lang.String proxyUsername,
                                                     java.lang.String proxyPassword)

      Sets the proxy authentication username and password to use with proxy server. To clear these settings invoke the #clearProxySettings method.
      Specified by:
        `setProxyAuthentication` in interface `FileTransfer`
      Parameters:
        `proxyUsername` - the proxy username
        `proxyPassword` - the proxy password
      See Also:
        `clearProxySettings()`

    - #### setProxyHost

          public FileTransfer setProxyHost(java.lang.String proxyHostname,
                                           int proxyPort)

      Sets the proxy hostname and port for this connection. To clear these settings invoke the #clearProxySettings method.
      Specified by:
        `setProxyHost` in interface `FileTransfer`
      Parameters:
        `proxyHostname` - the hostname or ip address of the proxy server
        `proxyPort` - the port of the proxy server to connect to
      See Also:
        `clearProxySettings()`

    - #### setProxyType

          public FileTransfer setProxyType(java.lang.String proxyType)

      Sets the proxy type will be used for this connection.
      Specified by:
        `setProxyType` in interface `FileTransfer`
      Parameters:
        `proxyType` - The proxy type. Values allowed: HTTP, SOCKS5

    - #### clearProxySettings

          public void clearProxySettings()

      Clears proxy server values.
      Specified by:
        `clearProxySettings` in interface `FileTransfer`

    - #### setTimeout

          public FileTransfer setTimeout(long timeout)

      See FileTransfer interface for method description.
      Specified by:
        `setTimeout` in interface `FileTransfer`
      Parameters:
        `timeout` - the timeout in milliseconds
      See Also:
        `FileTransfer.setTimeout(long)`

    - #### setUsername

          public FileTransfer setUsername(java.lang.String username)

      See FileTransfer interface for method description.
      Specified by:
        `setUsername` in interface `FileTransfer`
      Parameters:
        `username` - the username
      See Also:
        `FileTransfer.setUsername(String)`

    - #### setUseEPSV

          public FtpTransfer setUseEPSV(boolean useEPSV)

      Sets use EPSV indicator. When it is true then will be sent EPSV.
      Parameters:
        `useEPSV` - The use EPSV value

    - #### setAutoDetectIpv6

          public FtpTransfer setAutoDetectIpv6(boolean autoDetect)

      Set auto detect Ipv6.
      Parameters:
        `autoDetect` -

    - #### setUseEPRT

          public FtpTransfer setUseEPRT(boolean useEPRT)

      Sets use EPRT indicator.
      Parameters:
        `useEPRT` -

    - #### setUseExtendedDirectoryListing

          public void setUseExtendedDirectoryListing(boolean useExtendedDirectoryListing)

      Sets the use extended directory listing field.
      Parameters:
        `useExtendedDirectoryListing` - The use extended directory listing indicator.

    - #### getUseEPSV

          public boolean getUseEPSV()

      Gets use EPSV value.
      Returns:
        `true` the pasive mode will be sent EPSV command

    - #### setWireEncoding

          public FileTransfer setWireEncoding(java.lang.String encoding)

      Sets encoding set used when issuing commands and transferring files. The default encoding is UTF8
      Specified by:
        `setWireEncoding` in interface `FileTransfer`
      Parameters:
        `encoding` - the character encoding to be used

    - #### setConnectBeforeCommand

          public FtpTransfer setConnectBeforeCommand(boolean before)

      Sets the connectBefore property value
      Parameters:
        `before` - It indicates if the connection will be established before send the command in passive mode

    - #### getWireEncoding

          public java.lang.String getWireEncoding()

      Gets encoding set used when issuing commands and transferring files
      Specified by:
        `getWireEncoding` in interface `FileTransfer`
      Returns:
        Returns the encoding is being used

    - #### getRemoteFileChecksum

          public java.lang.String getRemoteFileChecksum(java.lang.String remoteFile)
                                                 throws FtpException

      Returns remote file checksum.
      Parameters:
        `remoteFile` - remote file
      Returns:
        remote file checksum.
      Throws:
        `FtpException` - if an error occurs

    - #### getLocalChecksum

          public java.lang.String getLocalChecksum(java.io.File localFile)
                                            throws FtpException

      Returns local checksum.
      Parameters:
        `localFile` - File which will be calculate the checksum
      Returns:
        checksum Compute value
      Throws:
        `FtpException` - if an error occurs

    - #### upload

          public void upload(byte[] data,
                             java.lang.String name)
                      throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `upload` in interface `FileTransfer`
      Parameters:
        `data` - the raw contents of the file to upload
        `name` - the filename to store file as on FTP server
      Throws:
        `FileTransferException` - if an I/O or server related error occurs
      See Also:
        `FileTransfer.upload(byte[], String)`

    - #### upload

          public void upload(byte[] data,
                             java.lang.String name,
                             boolean append)
                      throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `upload` in interface `FileTransfer`
      Parameters:
        `data` - the raw contents of the file to upload
        `name` - the filename to store file as on server
        `append` - `true` to append to remote file on FTP server, `false` otherwise
      Throws:
        `FileTransferException` - if an I/O or server related error occurs
      See Also:
        `FileTransfer.upload(byte[], String, boolean)`

    - #### upload

          public void upload(java.io.File file)
                      throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `upload` in interface `FileTransfer`
      Parameters:
        `file` - the local file to upload
      Throws:
        `FileTransferException` - if an I/O or server related error occurs
      See Also:
        `FileTransfer.upload(File)`

    - #### upload

          public void upload(java.io.File file,
                             boolean append)
                      throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `upload` in interface `FileTransfer`
      Parameters:
        `file` - the local file to upload
        `append` - `true` to append to remote file on server, `false` otherwise
      Throws:
        `FileTransferException` - if an I/O or server related error occurs
      See Also:
        `FileTransfer.upload(File, boolean)`

    - #### upload

          public void upload(java.lang.String extension,
                             java.io.File file)
                      throws FileTransferException

      Uploads a file to server with the extension specified by the argument. After the file has been uploaded then the file name is renamed to the original file name.
      Specified by:
        `upload` in interface `FileTransfer`
      Parameters:
        `extension` - The extension file will be used to upload the file.
        `file` - The file will be uploaded
      Throws:
        `FileTransferException`

    - #### upload

          public void upload(java.io.File file,
                             java.lang.String remoteName)
                      throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `upload` in interface `FileTransfer`
      Parameters:
        `file` - the local file to upload
        `remoteName` - the destination filename of upload
      Throws:
        `FileTransferException` - if an I/O or server related error occurs
      See Also:
        `FileTransfer.upload(File, String)`

    - #### upload

          public void upload(java.io.File file,
                             java.lang.String remoteName,
                             boolean append)
                      throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `upload` in interface `FileTransfer`
      Parameters:
        `file` - the local file to upload
        `remoteName` - the destination filename of upload
        `append` - `true` to append to remote file on server, `false` otherwise
      Throws:
        `FileTransferException` - if an I/O or server related error occurs
      See Also:
        `FileTransfer.upload(File, String, boolean)`

    - #### upload

          public void upload(java.lang.String name)
                      throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `upload` in interface `FileTransfer`
      Parameters:
        `name` - the local file to upload
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.upload(String)`

    - #### upload

          public void upload(java.lang.String name,
                             boolean append)
                      throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `upload` in interface `FileTransfer`
      Parameters:
        `name` - the local file to upload
        `append` - `true` to append to remote file on server, `false` otherwise
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.upload(String, boolean)`

    - #### upload

          public void upload(java.lang.String name,
                             java.lang.String remoteName)
                      throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `upload` in interface `FileTransfer`
      Parameters:
        `name` - the local file to upload
        `remoteName` - the destination of upload
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.upload(String, String)`

    - #### upload

          public void upload(java.lang.String name,
                             java.lang.String remoteName,
                             boolean append)
                      throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `upload` in interface `FileTransfer`
      Parameters:
        `name` - the local file to upload
        `remoteName` - the destination of upload
        `append` - `true` to append to remote file on FTP server, `false` otherwise
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      See Also:
        `FileTransfer.upload(String, String, boolean)`

    - #### uploadUnique

          public java.lang.String uploadUnique(java.lang.String fileName)
                                        throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `uploadUnique` in interface `FileTransfer`
      Parameters:
        `fileName` - the file to be uploaded relative to current local directory
      Returns:
        the resulting unique filename on server
      Throws:
        `FileTransferException` - if an I/O or protocol error occurs.
      See Also:
        `FileTransfer.uploadUnique(String)`

    - #### uploadUnique

          public java.lang.String uploadUnique(java.io.File file)
                                        throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `uploadUnique` in interface `FileTransfer`
      Parameters:
        `file` - the file to be uploaded
      Returns:
        the resulting unique filename on server
      Throws:
        `FileTransferException` - if an I/O or protocol error occurs.
      See Also:
        `FileTransfer.uploadUnique(File)`

    - #### uploadUnique

          public java.lang.String uploadUnique(java.io.InputStream in,
                                               java.lang.String remoteFilePrefix)
                                        throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `uploadUnique` in interface `FileTransfer`
      Parameters:
        `in` - the `InputStream` to upload file from
        `remoteFilePrefix` - the filename to be used as seed value for determining unique filename
      Returns:
        the resulting unique filename on server
      Throws:
        `FileTransferException` - if an I/O or protocol error occurs.
      See Also:
        `FileTransfer.uploadUnique(InputStream, String)`

    - #### uploadDir

          public void uploadDir(java.io.File localDir)
                         throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `uploadDir` in interface `FileTransfer`
      Parameters:
        `localDir` - the directory to upload
      Throws:
        `FileTransferException` - if an I/O or protocol error occurs.
      See Also:
        `FileTransfer.uploadDir(File)`

    - #### uploadDir

          public void uploadDir(java.io.File localDir,
                                java.lang.String extension)
                         throws FileTransferException

      Uploads local directory and contents recursively to server. Uploads are stored relative to current remote directory. Files are uploaded with the extension specified in the argument extension but when the upload has finished the remote file name is renamed to the original file name.
      Specified by:
        `uploadDir` in interface `FileTransfer`
      Parameters:
        `localDir` - the directory to upload
        `extension` - The extension file name used to upload each file
      Throws:
        `FileTransferException` - if an I/O or protocol error occurs.

    - #### uploadDir

          public void uploadDir(java.io.File localDir,
                                int retryLimit,
                                boolean performChecksum,
                                java.lang.String extension)
                         throws FileTransferException

      Uploads local directory and contents. Uploads are stored relative to current remote directory.
      Specified by:
        `uploadDir` in interface `FileTransfer`
      Parameters:
        `localDir` - the directory to upload
        `retryLimit` - Retry number when an error occurs
        `performChecksum` - Checksum perform indicator
        `extension` - The extension which will be used to upload the files
      Throws:
        `FtpException` - if an I/O or protocol error occurs.
        `FileTransferException` - if an I/O or protocol related error occurs.

    - #### uploadDir

          public void uploadDir(java.io.File localDir,
                                int retryLimit,
                                int retryInterval,
                                boolean performChecksum,
                                java.lang.String extension)
                         throws FileTransferException

      Uploads local directory and contents. Uploads are stored relative to current remote directory.
      Parameters:
        `localDir` - the directory to upload
        `retryLimit` - Retry number when an error occurs
        `retryInterval` - the retry interval in seconds
        `performChecksum` - Checksum perform indicator
        `extension` - The extension which will be used to upload the files
      Throws:
        `FtpException` - if an I/O or protocol error occurs.
        `FileTransferException`

    - #### addFileTransferListener

          public void addFileTransferListener(FileTransferListener listener)

      See FileTransfer interface for method description.
      Specified by:
        `addFileTransferListener` in interface `FileTransfer`
      Parameters:
        `listener` - the listener to add
      See Also:
        `FileTransfer.addFileTransferListener(FileTransferListener)`

    - #### removeFileTransferListener

          public void removeFileTransferListener(FileTransferListener listener)

      See FileTransfer interface for method description.
      Specified by:
        `removeFileTransferListener` in interface `FileTransfer`
      Parameters:
        `listener` - the listener to remove
      See Also:
        `FileTransfer.removeFileTransferListener(FileTransferListener)`

    - #### getInputStream

          public java.io.InputStream getInputStream(java.lang.String remoteFile,
                                                    long pos)
                                             throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `getInputStream` in interface `FileTransfer`
      Parameters:
        `remoteFile` - the remote file to get `InputStream` for
        `pos` - the byte offset, 0 to get full file
      Returns:
        an `InputStream`
      Throws:
        `FileTransferException` - if an I/O or protocol related error occurs

    - #### getImplementation

          public java.lang.Object getImplementation()

      See FileTransfer interface for method description.
      Specified by:
        `getImplementation` in interface `FileTransfer`
      Returns:
        underlying file transfer implementation
      See Also:
        `Ftp`, `Ftps`

    - #### getOutputStream

          public java.io.OutputStream getOutputStream(java.lang.String fileName,
                                                      long off)
                                               throws FileTransferException

      See FileTransfer interface for method description.
      Specified by:
        `getOutputStream` in interface `FileTransfer`
      Parameters:
        `fileName` - the remote filename
        `off` - the byte offset, 0 to write at beginning of file
      Returns:
        an `OutputStream`
      Throws:
        `FileTransferException` - if an I/O or protocol related error occurs

    - #### copy

          public FileTransfer copy()

      Description copied from interface: `FileTransfer`
      Returns a copy of current transfer instance with same listeners.
      Specified by:
        `copy` in interface `FileTransfer`
      Returns:
        a copy of current transfer instance

    - #### setBlockTransferSize

          public FileTransfer setBlockTransferSize(int blocksize)

      Sets block size for use in transferring files.
      Specified by:
        `setBlockTransferSize` in interface `FileTransfer`
      Parameters:
        `blocksize` - the blocksize in bytes

    - #### getBlockTransferSize

          public int getBlockTransferSize()

      Gets blocksize for use in transferring files.
      Specified by:
        `getBlockTransferSize` in interface `FileTransfer`
      Returns:
        blocksize in bytes

    - #### setCompression

          public FtpTransfer setCompression(boolean compression)

      Sets whether the data will be compressed during the transfering.
      Parameters:
        `compression` - When it is true the data will be compressed before it is sent between the client and the server.

    - #### setPort

          public FileTransfer setPort(int port)

      See FileTransfer interface for method description.
      Specified by:
        `setPort` in interface `FileTransfer`
      Parameters:
        `port` - the port
      See Also:
        `FileTransfer.setPort(int)`

    - #### isFeatureSupported

          public boolean isFeatureSupported(java.lang.String command)
                                     throws FileTransferException

      Throws:
        `FileTransferException`

    - #### checksum

          public void checksum(java.io.File localFile,
                               java.lang.String remoteFile)
                        throws FileTransferException

      Throws:
        `FileTransferException`

    - #### abortDownloadThreads

          public void abortDownloadThreads()

      Description copied from interface: `FileTransfer`
      Abort all download threads. Used by the implementing classes Sftp, Ftp, Ftps to abort all spawned threads.
      Specified by:
        `abortDownloadThreads` in interface `FileTransfer`

    - #### abortDownloadThread

          public void abortDownloadThread(java.lang.String remoteFile)

      Description copied from interface: `FileTransfer`
      Abort download thread.
      Specified by:
        `abortDownloadThread` in interface `FileTransfer`

    - #### abortUploadThread

          public void abortUploadThread(java.lang.String remoteFile)

      Description copied from interface: `FileTransfer`
      Abort upload thread.
      Specified by:
        `abortUploadThread` in interface `FileTransfer`

    - #### abortUploadThreads

          public void abortUploadThreads()

      Description copied from interface: `FileTransfer`
      Abort all upload threads. Used by the implementing classes Sftp, Ftp, Ftps to abort all spawned threads.
      Specified by:
        `abortUploadThreads` in interface `FileTransfer`

    - #### downloadDir

          public void downloadDir(java.lang.String remoteDir,
                                  int retryLimit,
                                  boolean performChecksum,
                                  int threadCount)
                           throws FileTransferException

      Description copied from interface: `FileTransfer`
      Downloads remote directory and contents. Downloads are stored relative to current local directory.
      Specified by:
        `downloadDir` in interface `FileTransfer`
      Parameters:
        `remoteDir` - the directory to download
        `retryLimit` - retry limit if download fails
        `performChecksum` - whether or not to perform checksum after download, only supported in FTP/S protocols and not by all FTP servers
        `threadCount` - the thread count
      Throws:
        `FileTransferException` - if an I/O or protocol error occurs.

    - #### getRemoteFileList

          public java.util.Vector<FileTransferRemoteFile> getRemoteFileList(java.lang.String remoteDirectory)
                                                                     throws FileTransferException

      Description copied from interface: `FileTransfer`
      Get remote directory list.
      Specified by:
        `getRemoteFileList` in interface `FileTransfer`
      Returns:
      Throws:
        `FileTransferException`

    - #### getRecursiveDirectoryFileCount

          public int getRecursiveDirectoryFileCount(java.lang.String directory)

      Description copied from interface: `FileTransfer`
      Get recursive directory file count.
      Specified by:
        `getRecursiveDirectoryFileCount` in interface `FileTransfer`
      Returns:

    - #### getRecursiveDirectorySize

          public long getRecursiveDirectorySize(java.lang.String directory)

      Description copied from interface: `FileTransfer`
      Get recursive directory size.
      Specified by:
        `getRecursiveDirectorySize` in interface `FileTransfer`
      Returns:

    - #### uploadDir

          public void uploadDir(java.io.File localDir,
                                int retryLimit,
                                boolean performChecksum,
                                java.lang.String extension,
                                int threadCount)
                         throws FileTransferException

      Description copied from interface: `FileTransfer`
      Uploads local directory and contents. Uploads are stored relative to current remote directory.
      Specified by:
        `uploadDir` in interface `FileTransfer`
      Parameters:
        `localDir` - the directory to upload
        `retryLimit` - retry number when an error occurs
        `performChecksum` - whether or not to perform checksum verification
        `extension` - the temporary extension which will be used when uploading files or `null` to use current extension
      Throws:
        `FileTransferException` - if an I/O or protocol related error occurs.

    - #### resumeUpload

          public void resumeUpload(java.io.File localFile,
                                   java.lang.String remoteFile,
                                   long localFileOffset)
                            throws FileTransferException

      Description copied from interface: `FileTransfer`
      Resume upload of file to server.
      Specified by:
        `resumeUpload` in interface `FileTransfer`
      Throws:
        `FileTransferException`

    - #### resumeDownload

          public void resumeDownload(java.io.OutputStream out,
                                     java.lang.String remoteFile,
                                     long remoteFileOffset)
                              throws FileTransferException

      Specified by:
        `resumeDownload` in interface `FileTransfer`
      Throws:
        `FileTransferException`

    - #### upload

          public void upload(java.io.InputStream in,
                             long length,
                             java.lang.String remoteFile,
                             boolean shouldAppend)
                      throws FileTransferException

      Specified by:
        `upload` in interface `FileTransfer`
      Throws:
        `FileTransferException`

    - #### resumeUpload

          public void resumeUpload(java.io.InputStream in,
                                   long length,
                                   java.lang.String remoteFile,
                                   long remoteFileOffset)
                            throws FileTransferException

      Specified by:
        `resumeUpload` in interface `FileTransfer`
      Throws:
        `FileTransferException`

Copyright © JSCAPE LLC. 1999-2021. All Rights Reserved