com.jscape.filetransfer

## Class FtpsTransfer

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

- All Implemented Interfaces:
    FileTransfer, java.lang.AutoCloseable
  Direct Known Subclasses:
    FtpsImplicitTransfer

      public class FtpsTransfer
      extends java.lang.Object
      implements FileTransfer

  Implements the basic functionality of a FTPS client using explicit SSL.

  Example Usage:

        // create new FtpsTransfer instance
        FileTransfer ftp = new FtpsTransfer("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
    `FtpsTransfer()` Creates FtpsTransfer instance.
    `FtpsTransfer(java.lang.String host, int port, java.lang.String user, java.lang.String password, java.io.File localDirectory, java.util.Set<FileTransferListener> listeners)`
    `FtpsTransfer(java.lang.String host, java.lang.String user, java.lang.String pwd)` Creates FtpsTransfer instance.
    `FtpsTransfer(java.lang.String host, java.lang.String user, java.lang.String pwd, java.io.File localDirectory)` Creates FtpsTransfer instance.
    `FtpsTransfer(java.lang.String host, java.lang.String user, java.lang.String pwd, int port)` Creates FtpsTransfer instance.
    `FtpsTransfer(java.lang.String host, java.lang.String user, java.lang.String pwd, java.lang.Integer port)` Method FtpsTransfer

  - ### 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)` Adds FileTransferListener.
    `void` | `addFtpsCertificateVerifier(FtpsCertificateVerifier listener)` Set certificate verifier handle acceptance of SSL certificate.
    `void` | `changePassword(java.lang.String oldPassword, java.lang.String newPassword)` Changes the password.
    `void` | `checksum(java.io.File localFile, java.lang.String remoteFile)`
    `void` | `clearCommandChannel()` Clears command channel.
    `void` | `clearProxySettings()` Clears proxy server values.
    `void` | `close()`
    `FtpsTransfer` | `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)` Deletes directory from server.
    `void` | `deleteDir(java.lang.String name, boolean recursive)` Deletes directory from server.
    `void` | `deleteFile(java.lang.String remoteFile)` Deletes remote file from server.
    `void` | `disconnect()` Quits session and disconnects from server.
    `void` | `download(java.io.OutputStream out, java.lang.String remoteFile)` Downloads file from server and writes contents to provided `OutputStream`.
    `java.io.File` | `download(java.lang.String remoteFile)` Downloads file from server.
    `java.io.File` | `download(java.lang.String localFile, java.lang.String remoteFile)` Downloads file from server.
    `void` | `downloadDir(java.lang.String remoteDir)` Downloads remote directory and contents recursively from server.
    `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.
    `boolean` | `getAutoDetectIpv6()` Get auto detect Ipv6.
    `int` | `getBlockTransferSize()` Gets blocksize for use in transferring files.
    `boolean` | `getDebug()` Gets debugging state.
    `java.io.PrintStream` | `getDebugStream()` Gets PrintStream used in reporting debug statements.
    `java.lang.String` | `getDir()` Gets current working directory of server.
    `java.util.Enumeration<FileTransferRemoteFile>` | `getDirListing()` Gets directory listing from server.
    `java.util.Enumeration<FileTransferRemoteFile>` | `getDirListing(java.lang.String filter)` Gets file listing of files matching regular expression.
    `java.lang.String` | `getDirListingAsString()` Gets directory listing of files on server.
    `java.lang.String` | `getDirListingAsString(java.lang.String filter)` Gets file listing of files matching regular expression.
    `boolean` | `getErrorOnSizeCommand()` Gets the error on size command indicator.
    `long` | `getFilesize(java.lang.String remoteFile)` Gets filesize of remote file from server.
    `java.util.Date` | `getFileTimestamp(java.lang.String remoteFile)` Gets date/timestamp of remote file from server.
    `java.lang.String` | `getHostname()` Gets hostname of server.
    `java.lang.Object` | `getImplementation()` Gets underlying file transfer instance.
    `java.io.InputStream` | `getInputStream(java.lang.String remoteFile, long pos)` Gets `InputStream` for remote file for reading.
    `java.lang.String` | `getLocalChecksum(java.io.File localFile)` Returns local checksum.
    `java.io.File` | `getLocalDir()` Gets local directory to be used in session.
    `java.util.Enumeration` | `getLocalDirListing()` Gets local directory listing.
    `int` | `getMode()` Gets data transfer mode for current session.
    `java.util.Enumeration` | `getNameListing()` Gets directory listing of files on server.
    `java.util.Enumeration` | `getNameListing(java.lang.String filter)` Gets directory listing of files on server matching regular expression.
    `java.io.OutputStream` | `getOutputStream(java.lang.String fileName, long off)` Gets `OutputStream` for writing to remote file.
    `boolean` | `getPassive()` Gets whether passive mode is used for FTP connections.
    `java.lang.String` | `getPassword()` Gets password.
    `boolean` | `getPerformMLSDListing()` Get MLSD directory listing.
    `int` | `getPort()` Gets server port.
    `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` | `getShutdownCCC()` Gets whether SSL connection should be shutdown after successfully issuing CCC command.
    `boolean` | `getTcpNoDelay()`
    `long` | `getTimeout()` Gets the timeout for opening connection to server.
    `boolean` | `getUseEPRT()` Gets use EPRT value.
    `boolean` | `getUseEPSV()` Gets use EPSV value.
    `java.lang.String` | `getUsername()` Gets username.
    `java.lang.String` | `getWireEncoding()` Gets encoding set used when issuing commands and transferring files.
    `void` | `interrupt()` See FileTransfer interface for method description.
    `boolean` | `interrupted()` Checks if transfer process was interrupted.
    `boolean` | `isChecksumVerificationRequired()`
    `boolean` | `isConnected()` Checks if client is connected to server.
    `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)` Makes directory on server.
    `void` | `makeDirRecursive(java.lang.String name)` Makes directory on server, creating subdirectories if necessary.
    `java.io.File` | `makeLocalDir(java.lang.String name)` Creates local directory.
    `void` | `mdelete(java.lang.String filter)` Deletes multiple files in servers current directory matching regular expression.
    `void` | `mdownload(java.util.Enumeration fileNames)` Downloads specified files in current working remote directory from server to local directory.
    `void` | `mdownload(java.lang.String filter)` Downloads multiple files matching regular expression from server's current directory.
    `void` | `mupload(java.util.Enumeration fileNames)` Uploads multiple files to server.
    `void` | `mupload(java.lang.String filter)` Uploads multiple files matching regular expression to server's current directory.
    `void` | `removeFileTransferListener(FileTransferListener listener)` Removes specified FileTransferListener.
    `void` | `renameFile(java.lang.String remoteFile, java.lang.String newFile)` Renames remote file on server.
    `void` | `reset()` Resets the interrupted flag to `false`.
    `void` | `resumeDownload(java.io.OutputStream out, java.lang.String remoteFile, long remoteFileOffset)`
    `void` | `resumeDownload(java.lang.String remoteFile, long offset)` Resumes download of file from server.
    `void` | `resumeDownload(java.lang.String localFile, java.lang.String remoteFile, long offset)` Resumes download of file from server.
    `void` | `resumeUpload(java.io.File file, long offset)` Resumes upload of file to server.
    `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)` Resumes upload of file to server.
    `boolean` | `sameChecksum(java.io.File localFile, java.lang.String remoteFile)` Checks a checksum equality of local and remote files.
    `FileTransfer` | `setAscii()` Sets data transfer mode to ASCII.
    `FileTransfer` | `setAuto(boolean auto)` Sets data transfer mode to automatically detect transfer mode.
    `FtpsTransfer` | `setAutoDetectIpv6(boolean value)` Set auto detect Ipv6.
    `FileTransfer` | `setBinary()` Sets data transfer mode to binary.
    `FileTransfer` | `setBlockTransferSize(int blocksize)` Sets block size for use in transferring files.
    `FileTransfer` | `setChecksumVerificationRequired(boolean value)`
    `FtpsTransfer` | `setClientCertificates(java.security.KeyStore keystore, java.lang.String password)` Sets optional client certificate keystore for use during authentication.
    `FtpsTransfer` | `setClientCertificates(java.lang.String filename, java.lang.String password)` Sets optional client certificate to be used during authentication.
    `FtpsTransfer` | `setClientCertificates(java.lang.String filename, java.lang.String password, java.lang.String storetype)` Sets optional client certificate to be used during authentication.
    `FtpsTransfer` | `setCompression(boolean compression)` Sets whether the data will be compressed during the transfering.
    `FtpsTransfer` | `setConnectBeforeCommand(boolean before)` Sets the connectBefore property value
    `FileTransfer` | `setDebug(boolean debug)` Sets debugging state.
    `FileTransfer` | `setDebugStream(java.io.PrintStream ps)` Sets `PrintStream` used in reporting debug statements.
    `FileTransfer` | `setDir(java.lang.String name)` Sets current directory on server.
    `FileTransfer` | `setDirUp()` Sets current directory on server to parent directory.
    `FtpsTransfer` | `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 file modifcation time.
    `FileTransfer` | `setFileTimestamp(java.lang.String remoteFile, java.util.Date timestamp)` Sets date/timestamp of remote file from server When using the FTP/S protocols the MDTM command is used.
    `FileTransfer` | `setHostname(java.lang.String host)` Sets hostname of server.
    `FileTransfer` | `setLocalDir(java.io.File dir)` Sets local directory to be used in session.
    `FtpsTransfer` | `setNATAddress(java.lang.String ipAddress)` Sets a NAT address which will be used after PASV command.
    `FileTransfer` | `setPassive(boolean passive)` Sets whether passive mode is used for FTP connections.
    `FileTransfer` | `setPassword(java.lang.String password)` Sets password.
    `FtpsTransfer` | `setPerformMLSDListing(boolean mlsdListing)` Set MLSD directory listing.
    `FileTransfer` | `setPort(int port)` Sets port of remote server.
    `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.
    `FtpsTransfer` | `setServerCertificates(java.security.KeyStore keystore)` Sets optional server certificate keystore to use during authentication.
    `FtpsTransfer` | `setServerCertificates(java.lang.String filename, java.lang.String password)` Sets optional server certificate to be used during authentication.
    `FtpsTransfer` | `setServerCertificates(java.lang.String filename, java.lang.String password, java.lang.String storetype)` Sets optional server certificate to be used during authentication.
    `FtpsTransfer` | `setShutdownCCC(boolean value)` Sets whether SSL connection should be shutdown after successfully issuing CCC command.
    `FtpsTransfer` | `setTcpNoDelay(boolean value)`
    `FileTransfer` | `setTimeout(long timeout)` Sets the timeout for opening connection to server.
    `FileTransfer` | `setTimeZone(java.util.TimeZone timeZone)` Set the timezone, used for preserving timestamps.
    `FtpsTransfer` | `setUseEPRT(boolean useEPRT)` Set use EPRT.
    `FtpsTransfer` | `setUseEPSV(boolean useEPSV)`
    `FtpsTransfer` | `setUseExtendedDirectoryListing(boolean useExtendedDirectoryListing)` Sets the use extended directory listing field.
    `FileTransfer` | `setUsername(java.lang.String username)` Sets username.
    `FileTransfer` | `setWireEncoding(java.lang.String encoding)` Sets encoding set used when issuing commands and transferring files.
    `void` | `upload(byte[] data, java.lang.String name)` Uploads file to server where contents of file is not on disk but in memory.
    `void` | `upload(byte[] data, java.lang.String name, boolean append)` Uploads file to server where contents of file is not on disk but in memory.
    `void` | `upload(java.io.File file)` Uploads file to server.
    `void` | `upload(java.io.File file, boolean append)` Uploads file to server.
    `void` | `upload(java.io.File file, java.lang.String remoteName)` Uploads file to server.
    `void` | `upload(java.io.File file, java.lang.String remoteName, boolean append)` Uploads file to server.
    `void` | `upload(java.io.InputStream in, long length, java.lang.String remoteFile, boolean shouldAppend)`
    `void` | `upload(java.lang.String name)` Uploads file to server.
    `void` | `upload(java.lang.String name, boolean append)` Uploads file to server.
    `void` | `upload(java.lang.String extension, java.io.File file)` Uploads file to server with the specified temporary extension.
    `void` | `upload(java.lang.String name, java.lang.String remoteName)` Uploads file to server.
    `void` | `upload(java.lang.String name, java.lang.String remoteName, boolean append)` Uploads file to server.
    `void` | `uploadDir(java.io.File localDir)` Uploads local directory and contents recursively to server.
    `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, java.lang.String extension)` Uploads local directory and contents recursively to server.
    `java.lang.String` | `uploadUnique(java.io.File file)` Uploads the file which is created in the current directory under a name unique to that directory.
    `java.lang.String` | `uploadUnique(java.io.InputStream in, java.lang.String remoteFilePrefix)` Uploads the file which is created in the current directory under a name unique to that directory.
    `java.lang.String` | `uploadUnique(java.lang.String fileName)` Uploads the file which is created in the current directory under a name unique to that directory.

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

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

- - ### Constructor Detail

    - #### FtpsTransfer

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

    - #### FtpsTransfer

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

      Creates FtpsTransfer 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

    - #### FtpsTransfer

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

      Creates FtpsTransfer 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

    - #### FtpsTransfer

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

      Method FtpsTransfer
      Parameters:
        `host` -
        `user` -
        `pwd` -
        `port` -

    - #### FtpsTransfer

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

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

    - #### FtpsTransfer

          public FtpsTransfer()

      Creates FtpsTransfer instance.

  - ### Method Detail

    - #### addFtpsCertificateVerifier

          public void addFtpsCertificateVerifier(FtpsCertificateVerifier listener)

      Set certificate verifier handle acceptance of SSL certificate.
      Parameters:
        `listener` - a `FtpsCertificateVerifier`
      See Also:
        `FtpsCertificateVerifier`

    - #### connect

          public FtpsTransfer connect()
                               throws FileTransferException

      Connects to server and performs login.
      Specified by:
        `connect` in interface `FileTransfer`
      Throws:
        `FileTransferException` - if an I/O or server error occurs.
      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`

    - #### setPreserveFileUploadTimestamp

          public FileTransfer setPreserveFileUploadTimestamp(boolean value)

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

    - #### setPreserveFileDownloadTimestamp

          public FileTransfer setPreserveFileDownloadTimestamp(boolean value)

      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)

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

    - #### clearCommandChannel

          public void clearCommandChannel()
                                   throws FileTransferException

      Clears command channel.
      Throws:
        `FileTransferException`

    - #### setCompression

          public FtpsTransfer 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.

    - #### 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 FTP error occurs

    - #### 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` - FileTransferException if underlayed I/O or FTP error occurs.

    - #### deleteDir

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

      Deletes directory from server.
      Specified by:
        `deleteDir` in interface `FileTransfer`
      Parameters:
        `name` - the directory to remove
      Throws:
        `FileTransferException` - if an I/O or server error occurs.

    - #### deleteDir

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

      Deletes directory from server. If the directory cannot be deleted because it is not empty the `recursive` parameter will be used to determine if files and subdirectories within directory should be removed.
      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.

    - #### 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

      Deletes remote file from server.
      Specified by:
        `deleteFile` in interface `FileTransfer`
      Parameters:
        `remoteFile` - name of file to delete
      Throws:
        `FileTransferException` - if an I/O or server error occurs.

    - #### disconnect

          public void disconnect()
                          throws FileTransferException

      Quits session and disconnects from server.
      Specified by:
        `disconnect` in interface `FileTransfer`
      Throws:
        `FileTransferException` - if an I/O or server error occurs.

    - #### 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

      Downloads file from server and writes contents to provided `OutputStream`. Closure of `OutputStream` is responsibility of programmer.
      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.

    - #### download

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

      Downloads file from server. Downloads are stored relative to current local directory.
      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.setLocalDir(java.io.File)`

    - #### download

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

      Downloads file from server. Downloads are stored relative to current local directory.
      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.setLocalDir(java.io.File)`

    - #### downloadDir

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

      Downloads remote directory and contents recursively from server. Downloads are stored relative to current local directory.
      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.setLocalDir(java.io.File)`

    - #### 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 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
      Throws:
        `FileTransferException` - if an I/O or protocol error occurs.

    - #### getDebug

          public boolean getDebug()

      Gets debugging state.
      Specified by:
        `getDebug` in interface `FileTransfer`
      Returns:
        `true` if debugging is on

    - #### getDebugStream

          public java.io.PrintStream getDebugStream()

      Gets PrintStream used in reporting debug statements. Default `PrintStream` is `System.out`.
      Specified by:
        `getDebugStream` in interface `FileTransfer`
      Returns:
        the `PrintStream` used in reporting debug statements
      See Also:
        `PrintStream`

    - #### getDir

          public java.lang.String getDir()
                                  throws FileTransferException

      Gets current working directory of server.
      Specified by:
        `getDir` in interface `FileTransfer`
      Returns:
        current directory
      Throws:
        `FileTransferException` - if an I/O or server error occurs.

    - #### getPerformMLSDListing

          public boolean getPerformMLSDListing()

      Get MLSD directory listing.
      Returns:
        boolean value

    - #### setPerformMLSDListing

          public FtpsTransfer setPerformMLSDListing(boolean mlsdListing)

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

    - #### getDirListing

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

      Gets directory listing from server.
      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.getDirListingAsString(String)`, `FileTransfer.getNameListing(java.lang.String)`

    - #### getDirListing

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

      Gets file listing of files matching regular expression. For example the regular expression "`.``*``\\.txt`" may return all files containing a .txt filename extension.
      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.getDirListingAsString(String)`, `FileTransfer.getNameListing(java.lang.String)`

    - #### getDirListingAsString

          public java.lang.String getDirListingAsString()
                                                 throws FileTransferException

      Gets directory listing of files on server.
      Specified by:
        `getDirListingAsString` in interface `FileTransfer`
      Returns:
        a directory listing
      Throws:
        `FileTransferException` - if an I/O or server error occurs.

    - #### getDirListingAsString

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

      Gets file listing of files matching regular expression. For example the regular expression "`.``*``\\.txt`" may return all files containing a .txt filename extension.
      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.

    - #### 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

      Gets filesize of remote file from server.

      When using the FTP/S protocols the SIZE command is used. The SIZE command is not part of RFC-959 so may not work on all FTP servers.
      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.

    - #### getFileTimestamp

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

      Gets date/timestamp of remote file from server.

      When using the FTP/S protocols the MDTM command is used. The MDTM command is not part of RFC-959 so may not work on all FTP servers.
      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.

    - #### setFileTimestamp

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

      Sets date/timestamp of remote file from server

      When using the FTP/S protocols the MDTM command is used. The MDTM command is not part of RFC-959 so may not work on all FTP servers.
      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.

    - #### setFileModificationTime

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

      Set file modifcation 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

      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()

      Gets hostname of server.
      Specified by:
        `getHostname` in interface `FileTransfer`
      Returns:
        hostname

    - #### getLocalDir

          public java.io.File getLocalDir()

      Gets local directory to be used in session. Downloads will be stored relative to local directory. Uploads are performed relative to current local directory.
      Specified by:
        `getLocalDir` in interface `FileTransfer`
      Returns:
        the local directory

    - #### getLocalDirListing

          public java.util.Enumeration getLocalDirListing()

      Gets local directory listing.
      Specified by:
        `getLocalDirListing` in interface `FileTransfer`
      Returns:
        an `java.util.Enumeration` of `File`

    - #### getMode

          public int getMode()

      Gets data transfer mode for current session. Default mode is FileTransfer.AUTO where 0 = AUTO, 1 = ASCII, 2 = BINARY
      Specified by:
        `getMode` in interface `FileTransfer`
      Returns:
        the data transfer mode
      See Also:
        `FileTransfer.AUTO`, `FileTransfer.BINARY`, `FileTransfer.ASCII`

    - #### getNameListing

          public java.util.Enumeration getNameListing()
                                               throws FileTransferException

      Gets directory listing of files on server.
      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

    - #### getNameListing

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

      Gets directory listing of files on server matching regular expression. For example "`.``*``\\.txt`" may return all files containing a .txt filename extension.
      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

    - #### getPassive

          public boolean getPassive()

      Gets whether passive mode is used for FTP connections.
      Specified by:
        `getPassive` in interface `FileTransfer`
      Returns:
        `true` if passive mode is used, `false` otherwise

    - #### getPassword

          public java.lang.String getPassword()

      Gets password.
      Specified by:
        `getPassword` in interface `FileTransfer`
      Returns:
        the password

    - #### getPort

          public int getPort()

      Gets server port. Default value is 21.
      Specified by:
        `getPort` in interface `FileTransfer`
      Returns:
        server port

    - #### getTimeout

          public long getTimeout()

      Gets the timeout for opening connection to server.
      Specified by:
        `getTimeout` in interface `FileTransfer`
      Returns:
        timeout in milliseconds

    - #### getUsername

          public java.lang.String getUsername()

      Gets username.
      Specified by:
        `getUsername` in interface `FileTransfer`
      Returns:
        username

    - #### interrupt

          public void interrupt()

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

    - #### interrupted

          public boolean interrupted()

      Checks if transfer process was interrupted.
      Specified by:
        `interrupted` in interface `FileTransfer`
      Returns:
        `true` if transfer process was interrupted.

    - #### isConnected

          public boolean isConnected()

      Checks if client is connected to server.
      Specified by:
        `isConnected` in interface `FileTransfer`
      Returns:
        `true` if connected `false` otherwise

    - #### makeDir

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

      Makes directory on server.
      Specified by:
        `makeDir` in interface `FileTransfer`
      Parameters:
        `name` - name of directory to make
      Throws:
        `FileTransferException` - if an I/O or server error occurs.

    - #### makeDirRecursive

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

      Makes directory on server, creating subdirectories if necessary.
      Specified by:
        `makeDirRecursive` in interface `FileTransfer`
      Parameters:
        `name` - full path of directory to make
      Throws:
        `FileTransferException` - if an I/O or server error occurs

    - #### mdelete

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

      Deletes multiple files in servers current directory matching regular expression. For example, to delete all files ending with .txt extension you may use the regular expression "`.``*``\\.txt`".
      Specified by:
        `mdelete` in interface `FileTransfer`
      Parameters:
        `filter` - the regular expression filter to use
      Throws:
        `FileTransferException` - if an error occurs.

    - #### makeLocalDir

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

      Creates local directory. Directory is relative to current local directory
      Specified by:
        `makeLocalDir` in interface `FileTransfer`
      Parameters:
        `name` - name of directory
      Returns:
        the directory
      See Also:
        `FileTransfer.getLocalDir()`

    - #### mdownload

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

      Downloads specified files in current working remote directory from server to local directory. Do not use this method to download a directory, see `downloadDir(String)` method.

      Downloads are stored relative to current local directory.
      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.setLocalDir(java.io.File)`, `FileTransfer.downloadDir(String)`

    - #### mdownload

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

      Downloads multiple files matching regular expression from server's current directory. Downloads are stored relative to current local directory. For example, to download all files ending with extension .txt use the filter "`.``*``\\.txt`".

      To download a directory use the `downloadDir` method.
      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.setLocalDir(java.io.File)`, `FileTransfer.downloadDir(java.lang.String, int, boolean, int)`

    - #### mupload

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

      Uploads multiple files to server. Uploads are performed relative to current local directory.
      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.setLocalDir(java.io.File)`

    - #### mupload

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

      Uploads multiple files matching regular expression to server's current directory. Uploads are performed relative to current local directory. For example, to upload all files with extension .txt you may use the regular expression "`.``*``\\.txt`".
      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.setLocalDir(java.io.File)`

    - #### renameFile

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

      Renames remote file on server.
      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.

    - #### reset

          public void reset()

      Resets the interrupted flag to `false`. This method should be invoked if you have interrupted a transfer using the `interrupt` method and wish to resume transfering files.
      Specified by:
        `reset` in interface `FileTransfer`
      See Also:
        `FileTransfer.interrupt()`

    - #### resumeDownload

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

      Resumes download of file from server.
      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.

    - #### resumeDownload

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

      Resumes download of file from server.
      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.

    - #### resumeUpload

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

      Resumes upload of file to server.
      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.

    - #### resumeUpload

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

      Resumes upload of file to server.
      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.

    - #### setAscii

          public FileTransfer setAscii()

      Sets data transfer mode to ASCII. You must be connected to the server prior to invoking this method.
      Specified by:
        `setAscii` in interface `FileTransfer`

    - #### setAuto

          public FileTransfer setAuto(boolean auto)

      Sets data transfer mode to automatically detect transfer mode. Any files with a base Content-Type value of text will be transferred using ASCII, all other files will be transfered using binary.

      Example: file.txt, Content-Type = text/plain, uploaded using ASCII
      Example: image.jpg Content-Type = image/jpg, uploaded using binary
      Specified by:
        `setAuto` in interface `FileTransfer`
      Parameters:
        `auto` - `true` to turn automatic detect on `false` to turn off

    - #### setBinary

          public FileTransfer setBinary()

      Sets data transfer mode to binary. You must be connected to the server prior to invoking this method.
      Specified by:
        `setBinary` in interface `FileTransfer`

    - #### setDebug

          public FileTransfer setDebug(boolean debug)

      Sets debugging state. All debug statements are reported to debug stream. Default debug stream is `System.out`.
      Specified by:
        `setDebug` in interface `FileTransfer`
      Parameters:
        `debug` - `true` to turn debugging on
      See Also:
        `FileTransfer.setDebugStream(java.io.PrintStream)`

    - #### setDebugStream

          public FileTransfer setDebugStream(java.io.PrintStream ps)

      Sets `PrintStream` used in reporting debug statements. Default debug stream is `System.out`.
      Specified by:
        `setDebugStream` in interface `FileTransfer`
      Parameters:
        `ps` - the `PrintStream` to send debug statements to
      See Also:
        `PrintStream`

    - #### setDir

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

      Sets current directory on server.
      Specified by:
        `setDir` in interface `FileTransfer`
      Parameters:
        `name` - the remote directory
      Throws:
        `FileTransferException` - if an I/O or server error occurs.

    - #### setDirUp

          public FileTransfer setDirUp()
                                throws FileTransferException

      Sets current directory on server to parent directory.
      Specified by:
        `setDirUp` in interface `FileTransfer`
      Throws:
        `FileTransferException` - if an I/O or server error occurs.

    - #### setErrorOnSizeCommand

          public FtpsTransfer 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.

    - #### setHostname

          public FileTransfer setHostname(java.lang.String host)

      Sets hostname of server.
      Specified by:
        `setHostname` in interface `FileTransfer`
      Parameters:
        `host` - the hostname or IP address of server

    - #### setPort

          public FileTransfer setPort(int port)

      Sets port of remote server.
      Specified by:
        `setPort` in interface `FileTransfer`
      Parameters:
        `port` - the port

    - #### setLocalDir

          public FileTransfer setLocalDir(java.io.File dir)

      Sets local directory to be used in session. Downloads will be stored relative to local directory. Uploads are performed relative to current local directory.
      Specified by:
        `setLocalDir` in interface `FileTransfer`
      Parameters:
        `dir` - the local directory

    - #### getTcpNoDelay

          public boolean getTcpNoDelay()

    - #### setTcpNoDelay

          public FtpsTransfer setTcpNoDelay(boolean value)

    - #### setNATAddress

          public FtpsTransfer 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)

      Sets whether passive mode is used for FTP connections.
      Specified by:
        `setPassive` in interface `FileTransfer`
      Parameters:
        `passive` - if true, the transfers will be passive.

    - #### setPassword

          public FileTransfer setPassword(java.lang.String password)

      Sets password.
      Specified by:
        `setPassword` in interface `FileTransfer`
      Parameters:
        `password` - the password

    - #### setClientCertificates

          public FtpsTransfer setClientCertificates(java.security.KeyStore keystore,
                                                    java.lang.String password)
                                             throws FileTransferException

      Sets optional client certificate keystore for use during authentication.
      Parameters:
        `keystore` - the client keystore
        `password` - the keystore password
      Throws:
        `FileTransferException` - if an I/O error occurs

    - #### setClientCertificates

          public FtpsTransfer setClientCertificates(java.lang.String filename,
                                                    java.lang.String password)
                                             throws FileTransferException

      Sets optional client certificate to be used during authentication. Default expected keystore format is JKS format. Existing certificate may be imported into keystore using the `keytool` utility provided in the Sun JDK.

      Example:

            keytool.exe -import -file x509.cer -keystore your_store_name

      The example above imports the certificate x509.cer into a keystore named your_store_name

      Parameters:
        `filename` - the keystore file containing the client certificate
        `password` - the keystore password
      Throws:
        `FileTransferException` - if an I/O error occurs

    - #### setClientCertificates

          public FtpsTransfer setClientCertificates(java.lang.String filename,
                                                    java.lang.String password,
                                                    java.lang.String storetype)
                                             throws FileTransferException

      Sets optional client certificate to be used during authentication. Default expected keystore format is JKS format. Existing certificate may be imported into keystore using the `keytool` utility provided in the Sun JDK.

      Example:

            keytool.exe -import -file x509.cer -keystore your_store_name

      The example above imports the certificate x509.cer into a keystore named your_store_name

      Parameters:
        `filename` - the keystore file containing the client certificate
        `password` - the keystore password
        `storetype` - the keystore type valid values include jks and pkcs12
      Throws:
        `FileTransferException` - if an I/O error occurs

    - #### setServerCertificates

          public FtpsTransfer setServerCertificates(java.security.KeyStore keystore)
                                             throws FileTransferException

      Sets optional server certificate keystore to use during authentication.
      Parameters:
        `keystore` - the keystore
      Throws:
        `FileTransferException` - if an I/O error occurs

    - #### setServerCertificates

          public FtpsTransfer setServerCertificates(java.lang.String filename,
                                                    java.lang.String password)
                                             throws FileTransferException

      Sets optional server certificate to be used during authentication. Default expected keystore format is JKS format. Existing certificate may be imported into keystore using the `keytool` utility provided in the Sun JDK.

      Example:

            keytool.exe -import -file x509.cer -keystore your_store_name

      The example above imports the certificate x509.cer into a keystore named your_store_name

      Parameters:
        `filename` - the keystore file containing the server certificate
        `password` - the keystore password
      Throws:
        `FileTransferException` - if an I/O error occurs

    - #### setServerCertificates

          public FtpsTransfer setServerCertificates(java.lang.String filename,
                                                    java.lang.String password,
                                                    java.lang.String storetype)
                                             throws FileTransferException

      Sets optional server certificate to be used during authentication. Default expected keystore format is JKS format. Existing certificate may be imported into keystore using the `keytool` utility provided in the Sun JDK.

      Example:

            keytool.exe -import -file x509.cer -keystore your_store_name

      The example above imports the certificate x509.cer into a keystore named your_store_name

      Parameters:
        `filename` - the keystore file containing the server certificate
        `password` - the keystore password
        `storetype` - the keystore type valid values include jks and pkcs12
      Throws:
        `FileTransferException` - if an I/O error occurs

    - #### setTimeout

          public FileTransfer setTimeout(long timeout)

      Sets the timeout for opening connection to server.
      Specified by:
        `setTimeout` in interface `FileTransfer`
      Parameters:
        `timeout` - the timeout in milliseconds

    - #### setUsername

          public FileTransfer setUsername(java.lang.String username)

      Sets username.
      Specified by:
        `setUsername` in interface `FileTransfer`
      Parameters:
        `username` - the username

    - #### setUseEPSV

          public FtpsTransfer setUseEPSV(boolean useEPSV)

    - #### setUseEPRT

          public FtpsTransfer setUseEPRT(boolean useEPRT)

      Set use EPRT.
      Parameters:
        `useEPRT` -

    - #### setAutoDetectIpv6

          public FtpsTransfer setAutoDetectIpv6(boolean value)

      Set auto detect Ipv6.
      Parameters:
        `value` -

    - #### setUseExtendedDirectoryListing

          public FtpsTransfer 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 passive mode will be sent EPSV command

    - #### getUseEPRT

          public boolean getUseEPRT()

      Gets use EPRT value.
      Returns:
        `true` active mode will be sent EPRT command

    - #### getAutoDetectIpv6

          public boolean getAutoDetectIpv6()

      Get auto detect Ipv6.
      Returns:
        `true` if auto-detect Ipv6 is set to true

    - #### setConnectBeforeCommand

          public FtpsTransfer setConnectBeforeCommand(boolean before)

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

    - #### 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

    - #### 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

      Uploads file to server where contents of file is not on disk but in memory.
      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

    - #### upload

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

      Uploads file to server where contents of file is not on disk but in memory.
      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

    - #### upload

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

      Uploads file to server. If `file` is a directory then directory and entire contents are uploaded.
      Specified by:
        `upload` in interface `FileTransfer`
      Parameters:
        `file` - the local file to upload
      Throws:
        `FileTransferException` - if an I/O or server related error occurs

    - #### upload

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

      Uploads file to server. If `file` is a directory then directory and entire contents are uploaded.
      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

    - #### upload

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

      Uploads file to server with the specified temporary extension. After the file has been uploaded then the file is renamed to the original filename.
      Specified by:
        `upload` in interface `FileTransfer`
      Parameters:
        `extension` - the temporary extension to use when uploading the file
        `file` - the file to be uploaded
      Throws:
        `FileTransferException` - if an I/O or protocol error occurs

    - #### upload

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

      Uploads file to server. If `file` is a directory then directory and entire contents are uploaded.
      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

    - #### upload

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

      Uploads file to server. If `file` is a directory then directory and entire contents are uploaded.
      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

    - #### upload

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

      Uploads file to server. Uploads are performed relative to current local directory.
      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.setLocalDir(java.io.File)`

    - #### upload

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

      Uploads file to server. Uploads are performed relative to current local directory.
      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.setLocalDir(java.io.File)`

    - #### upload

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

      Uploads file to server. Uploads are performed relative to current local directory.
      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.setLocalDir(java.io.File)`

    - #### upload

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

      Uploads file to server. Uploads are performed relative to current local directory.
      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.setLocalDir(java.io.File)`

    - #### uploadUnique

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

      Uploads the file which is created in the current directory under a name unique to that directory.
      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.setLocalDir(File)`

    - #### uploadUnique

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

      Uploads the file which is created in the current directory under a name unique to that directory.
      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.

    - #### uploadUnique

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

      Uploads the file which is created in the current directory under a name unique to that directory.
      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.

    - #### uploadDir

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

      Uploads local directory and contents recursively to server. Uploads are stored relative to current remote directory.
      Specified by:
        `uploadDir` in interface `FileTransfer`
      Parameters:
        `localDir` - the directory to upload
      Throws:
        `FileTransferException` - if an I/O or protocol error occurs.

    - #### 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` - 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.

    - #### addFileTransferListener

          public void addFileTransferListener(FileTransferListener listener)

      Adds FileTransferListener.
      Specified by:
        `addFileTransferListener` in interface `FileTransfer`
      Parameters:
        `listener` - the listener to add
      See Also:
        `FileTransferListener`

    - #### removeFileTransferListener

          public void removeFileTransferListener(FileTransferListener listener)

      Removes specified FileTransferListener.
      Specified by:
        `removeFileTransferListener` in interface `FileTransfer`
      Parameters:
        `listener` - the listener to remove
      See Also:
        `FileTransferListener`

    - #### getInputStream

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

      Gets `InputStream` for remote file for reading.
      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()

      Gets underlying file transfer instance.
      Specified by:
        `getImplementation` in interface `FileTransfer`
      Returns:
        an instance of `Ftp`, `Ftps` or `Sftp`
      See Also:
        `Ftp`, `Ftps`

    - #### getOutputStream

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

      Gets `OutputStream` for writing to remote file.
      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()

      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

    - #### setShutdownCCC

          public FtpsTransfer setShutdownCCC(boolean value)

      Sets whether SSL connection should be shutdown after successfully issuing CCC command. Default is true.
      Parameters:
        `value` - `true` to shutdown, `false` otherwise

    - #### getShutdownCCC

          public boolean getShutdownCCC()

      Gets whether SSL connection should be shutdown after successfully issuing CCC command. Default is true.
      Returns:
        `true` to shutdown, `false` otherwise

    - #### 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:
        `FileTransfer.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:
        `FileTransfer.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`

    - #### 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`

    - #### abortDownloadThread

          public void abortDownloadThread(java.lang.String remoteFile)

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

    - #### abortDownloadThreads

          public void abortDownloadThreads()

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

    - #### abortUploadThread

          public void abortUploadThread(java.lang.String remoteFile)

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

    - #### abortUploadThreads

          public void abortUploadThreads()

      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

      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

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

    - #### getRecursiveDirectoryFileCount

          public int getRecursiveDirectoryFileCount(java.lang.String directory)

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

    - #### getRecursiveDirectorySize

          public long getRecursiveDirectorySize(java.lang.String directory)

      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

      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

      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