Examples of retrieveFile()


Examples of org.apache.commons.net.ftp.FTPClient.retrieveFile()

            else
            {
                OutputStream output;

                output = new FileOutputStream(local);
                ftp.retrieveFile(remote, output);
            }

            ftp.logout();
        }
        catch (FTPConnectionClosedException e)
View Full Code Here

Examples of org.apache.commons.net.ftp.FTPClient.retrieveFile()

            {
                OutputStream output;

                output = new FileOutputStream(local);

                ftp.retrieveFile(remote, output);

                output.close();
            }

            ftp.logout();
View Full Code Here

Examples of org.apache.commons.net.ftp.FTPClient.retrieveFile()

            {
                OutputStream output;

                output = new FileOutputStream(local);

                ftp.retrieveFile(remote, output);

                output.close();
            }

            ftp.noop(); // check that control connection is working OK
View Full Code Here

Examples of org.apache.commons.net.ftp.FTPClient.retrieveFile()

            {
                OutputStream output;

                output = new FileOutputStream(local);

                ftp.retrieveFile(remote, output);

                output.close();
            }

            ftp.logout();
View Full Code Here

Examples of org.apache.commons.net.ftp.FTPClient.retrieveFile()

    File file = new File(path, name);
    file = UploadUtils.getUniqueFile(file);

    FTPClient ftp = getClient();
    OutputStream output = new FileOutputStream(file);
    ftp.retrieveFile(getPath() + name, output);
    output.close();
    ftp.logout();
    ftp.disconnect();
    return file;
  }
View Full Code Here

Examples of org.apache.commons.net.ftp.FTPClient.retrieveFile()

    if(failifexists && local.exists()) throw new ApplicationException("File ["+local+"] already exist, if you want to overwrite, set attribute failIfExists to false");
    OutputStream fos=null;
        client.setFileType(getType(local));
        try {
          fos=IOUtil.toBufferedOutputStream(local.getOutputStream());
            client.retrieveFile(remotefile,fos);
        }
        finally {
          IOUtil.closeEL(fos);
        }
        writeCfftp(client);
View Full Code Here

Examples of org.apache.commons.net.ftp.FTPClient.retrieveFile()

            {
                OutputStream output;

                output = new FileOutputStream(local);

                ftp.retrieveFile(remote, output);

                output.close();
            }

            ftp.noop(); // check that control connection is working OK
View Full Code Here

Examples of org.apache.commons.net.ftp.FTPClient.retrieveFile()

      File ficheroLocal = new File("c:" + File.separator + "modelo.txt");
     
      System.out.println("Descargando fichero '" + ficheroRemoto + "' del servidor . . .");
      // Descarga un fichero del servidor FTP
      OutputStream os = new BufferedOutputStream(new FileOutputStream(ficheroLocal));
      if (clienteFtp.retrieveFile(ficheroRemoto, os))
        System.out.println("El fichero se ha recibido correctamente");
     
      os.close();
     
      /*
 
View Full Code Here

Examples of org.apache.commons.net.ftp.FTPClient.retrieveFile()

    try {
      FTPClient ftpClient = null;
      try {
        ftpClient = connect();
        ftpClient.setFileType( FTPClient.BINARY_FILE_TYPE );
        if (!ftpClient.retrieveFile( getFullPath( filename ), outputStream )) {
          throw new RuntimeException("Retrieving file '" + filename + "' was not successful. FTPClient.retrieveFile() returned false");
        }
      } finally {
        disconnect( ftpClient );
      }
View Full Code Here

Examples of org.apache.commons.net.ftp.FTPClient.retrieveFile()

            {
                OutputStream output;

                output = new FileOutputStream(local);

                ftp.retrieveFile(remote, output);

                output.close();
            }

            ftp.logout();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.