code: public void copy()
          throws UrlCopyException {
  
          if (srcUrl == null) {
              throw new UrlCopyException("Source url is not specified");
          }
  
          if (dstUrl == null) {
              throw new UrlCopyException("Destination url is not specified");
          }
  
          String fromP  = srcUrl.getProtocol();
          String toP    = dstUrl.getProtocol();
  
          if (thirdParty && fromP.endsWith("ftp") && toP.endsWith("ftp")) {
              thirdPartyTransfer();
              return;
          }
  
          GlobusInputStream in   = null;
          GlobusOutputStream out = null;
          boolean rs             = false;
  
          try {
              in = getInputStream();
  
              long size = in.getSize();
  
              if (size == -1) {
                  logger.debug("Source size: unknown");
              } else {
                  logger.debug("Source size: " + size);
              }
  
              out = getOutputStream(size);
  
              rs = transfer(size, in, out);
  
              in.close();
              out.close();
  
          } catch(Exception e) {
              if (out != null) out.abort();
              if (in  != null) in.abort();
              throw new UrlCopyException("UrlCopy transfer failed.", e);
          }
  
          if (!rs && isCanceled()) {
              throw new UrlCopyException("Transfer Aborted");
          }
      }
docs: Performs the copy function.
  Source and destination urls must be specified otherwise
  a exception is thrown. Also, if source and destination url
  are ftp urls and thirdPartyCopy is enabled, third party transfer
  will be performed. Urls, of course, must be of supported protocol.
  Currently, gsiftp, ftp, https, http, and file are supported.
  <p>
  This method does not cause the {@link UrlCopyListener#transferCompleted()}
  and {@link UrlCopyListener#transferError(Exception)} to be called. If you want
  completion/failures to be signaled asynchronously, either call the
  {@link #run} method or wrap this object in a {@link Thread}.
  
  @throws UrlCopyException in case of an error.