Package org.apache.commons.net.ftp

Examples of org.apache.commons.net.ftp.FTPSClient.disconnect()


                }
                catch (final IOException e)
                {
                    if (client.isConnected())
                    {
                        client.disconnect();
                    }
                    throw e;
                }

                return client;
View Full Code Here


            // success.
            reply = ftps.getReplyCode();

            if (!FTPReply.isPositiveCompletion(reply))
            {
                ftps.disconnect();
                System.err.println("FTP server refused connection.");
                System.exit(1);
            }
        }
        catch (IOException e)
View Full Code Here

        {
            if (ftps.isConnected())
            {
                try
                {
                    ftps.disconnect();
                }
                catch (IOException f)
                {
                    // do nothing
                }
View Full Code Here

        {
            if (ftps.isConnected())
            {
                try
                {
                    ftps.disconnect();
                }
                catch (IOException f)
                {
                    // do nothing
                }
View Full Code Here

                }
                catch (final IOException e)
                {
                    if (client.isConnected())
                    {
                        client.disconnect();
                    }
                    throw e;
                }

                return client;
View Full Code Here

    } catch (NoSuchAlgorithmException e) {
      throw new RuntimeException( String.format( "%s does not understand %s", this.hostname, this.protocol ), e );
    }
    ftpClient.connect( InetAddress.getByName( hostname ) );
    if (!FTPReply.isPositiveCompletion( ftpClient.getReplyCode() )) {
      ftpClient.disconnect();
      throw new RuntimeException( String.format( "%s refused connection over %s", this.hostname, this.protocol ) );
    }
    ftpClient.login( this.username, this.password );
    ftpClient.enterLocalPassiveMode();
    return ftpClient;
View Full Code Here

            // success.
            reply = ftps.getReplyCode();

            if (!FTPReply.isPositiveCompletion(reply))
            {
                ftps.disconnect();
                System.err.println("FTP server refused connection.");
                System.exit(1);
            }
        }
        catch (IOException e)
View Full Code Here

        {
            if (ftps.isConnected())
            {
                try
                {
                    ftps.disconnect();
                }
                catch (IOException f)
                {
                    // do nothing
                }
View Full Code Here

        {
            if (ftps.isConnected())
            {
                try
                {
                    ftps.disconnect();
                }
                catch (IOException f)
                {
                    // do nothing
                }
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.