com.enterprisedt.net.ftp
Class FXPTransfer

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

public class FXPTransfer
extends java.lang.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: 1.1 $
Author:
Bruce Blackshaw

Constructor Summary
FXPTransfer(FTPClient source, FTPClient dest)
          Constructor
 
Method Summary
 void transferFile(java.lang.String sourceFile, java.lang.String destFile)
          Transfer a file between FTP servers using FXP.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FXPTransfer

public FXPTransfer(FTPClient source,
                   FTPClient dest)
Constructor

Parameters:
source - source FTPClient
dest - destination FTPClient
Method Detail

transferFile

public void transferFile(java.lang.String sourceFile,
                         java.lang.String destFile)
                  throws FTPException,
                         java.io.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
java.io.IOException


Copyright © 2001-2006 Enterprise Distributed Technologies Ltd. All Rights Reserved.