Class FXPTransfer

java.lang.Object
com.enterprisedt.net.ftp.FXPTransfer

public class FXPTransfer extends Object
Performs FXP transfers between two FTP servers. Both FTP servers must have FXP enabled - note that FXP is generally disabled by default (for good reasons). Be wary about enabling FXP on publicly available FTP servers.
Version:
$Revision$
Author:
Bruce Blackshaw
  • Constructor Details

    • FXPTransfer

      public FXPTransfer(FTPClient source, FTPClient dest)
      Constructor
      Parameters:
      source - source FTPClient
      dest - destination FTPClient
  • Method Details

    • transferFile

      public void transferFile(String sourceFile, String destFile) throws FTPException, IOException
      Transfer a file between FTP servers using FXP.

      For this to succeed, both FTP servers must have FXP enabled. The source and destination FTPClients must already be connected to their FTP servers when this method is called.

      The file will be transferred in whatever mode is currently set, i.e. BINARY or ASCII.

      The file must be in the current working directory of the source, and will be placed in the current working directory of the destination.

      Parameters:
      sourceFile - name of source file to transfer
      destFile - name of destination file (so the file can be renamed).
      Throws:
      FTPException
      IOException