code: private void thirdPartyTransfer()
          throws UrlCopyException {
  
          logger.debug("Trying third party transfer...");
  
          FTPClient srcFTP = null;
          FTPClient dstFTP = null;
  
          try {
              srcFTP = createFTPConnection(srcUrl, true);
  
              dstFTP = createFTPConnection(dstUrl, false);
  
              negotiateDCAU(srcFTP, dstFTP);
  
              srcFTP.setType(Session.TYPE_IMAGE);
              dstFTP.setType(Session.TYPE_IMAGE);
  
              if (listeners != null) {
                  fireUrlTransferProgressEvent(-1, -1);
              }
  
              if (this.sourceOffset == 0 &&
                  this.destinationOffset == 0 &&
                  this.sourceLength == Long.MAX_VALUE) {
  
                  srcFTP.setMode(Session.MODE_STREAM);
                  dstFTP.setMode(Session.MODE_STREAM);
  
                  srcFTP.transfer(srcUrl.getPath(),
                                  dstFTP,
                                  dstUrl.getPath(),
                                  false,
                                  null);
              } else if (srcFTP instanceof GridFTPClient &&
                         dstFTP instanceof GridFTPClient) {
  
                  GridFTPClient srcGridFTP = (GridFTPClient) srcFTP;
                  GridFTPClient dstGridFTP = (GridFTPClient) dstFTP;
  
                  srcGridFTP.setMode(GridFTPSession.MODE_EBLOCK);
                  dstGridFTP.setMode(GridFTPSession.MODE_EBLOCK);
  
                  srcGridFTP.extendedTransfer(srcUrl.getPath(),
                                              this.sourceOffset,
                                              this.sourceLength,
                                              dstGridFTP,
                                              dstUrl.getPath(),
                                              this.destinationOffset,
                                              null);
              } else {
                  throw new UrlCopyException("Partial 3rd party transfers not supported " +
                                             "by FTP client. Use GridFTP for both source and destination.");
              }
          } catch(Exception e) {
              throw new UrlCopyException("UrlCopy third party transfer failed.",
                                         e);
          } finally {
              if (srcFTP != null) {
                  try { srcFTP.close(); } catch (Exception ee) {}
              }
              if (dstFTP != null) {
                  try { dstFTP.close(); } catch (Exception ee) {}
              }
          }
      }
docs: This performs thrid party transfer only if source and destination urls
  are ftp urls.