Package org.globus.ftp

Examples of org.globus.ftp.FTPClient


  }

  public void connect(String host, String username, String password)
          throws ProtocolException {
      try {
          ftp = new FTPClient(host, 21);
      } catch (Exception e) {
          throw new ProtocolException("Failed to connect to: " + host + " : "
                  + e.getMessage());
      }
      isConnected = true;
View Full Code Here


    cd(new ProtocolFile(homeDir, true));
  }

  public void connect(String host, Authentication auth) throws ProtocolException {
      try {
          ftp = new FTPClient(host, port);
      } catch (Exception e) {
          throw new ProtocolException("Failed to connect to: " + host + " : "
                  + e.getMessage(), e);
      }
      isConnected = true;
View Full Code Here

    cd(new ProtocolFile(homeDir, true));
  }

  public void connect(String host, Authentication auth) throws ProtocolException {
      try {
          ftp = new FTPClient(host, port);
      } catch (Exception e) {
          throw new ProtocolException("Failed to connect to: " + host + " : "
                  + e.getMessage(), e);
      }
      isConnected = true;
View Full Code Here

          e.printStackTrace();
        }
      } else if (remoteProtocol.equals("ftp")) {
         // set up globus FTP client
        try {
          FTPClient ftp = new FTPClient(remoteSite, 21);
          ftp.authorize(remoteUser, remotePassword);
          ftp.setType(Session.TYPE_IMAGE);
          DataSinkStream outputSink = new DataSinkStream(output);
          ftp.get(remotePath, outputSink, null);
        } catch (Exception e) {
          Log.error(Log.RESOURCES,"Problem with ftp from site: "+remoteUser+"@"+remoteSite+":"+remotePath);
          e.printStackTrace();
        }
      } else {
View Full Code Here

TOP

Related Classes of org.globus.ftp.FTPClient

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.