Examples of enterLocalPassiveMode()


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

        }
        if (!client.login(user, pass))
        {
            throw new IllegalArgumentException("login failed");
        }
        client.enterLocalPassiveMode();

        OutputStream os = client.storeFileStream(dir + "/test.txt");
        if (os == null)
        {
            throw new IllegalStateException(client.getReplyString());
View Full Code Here

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

                }
            }

            if (passive) {
                log("entering passive mode", Project.MSG_VERBOSE);
                ftp.enterLocalPassiveMode();
                if (!FTPReply.isPositiveCompletion(ftp.getReplyCode())) {
                    throw new BuildException("could not enter into passive "
                         + "mode: " + ftp.getReplyString());
                }
            }
View Full Code Here

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

                }

                Boolean passiveMode = FtpFileSystemConfigBuilder.getInstance().getPassiveMode(fileSystemOptions);
                if (passiveMode != null && passiveMode.booleanValue())
                {
                    client.enterLocalPassiveMode();
                }

                String controlEncoding = FtpFileSystemConfigBuilder.getInstance().getControlEncoding(fileSystemOptions);
                if (controlEncoding != null)
                {
View Full Code Here

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

                }
            }

            if (passive) {
                log("entering passive mode", Project.MSG_VERBOSE);
                ftp.enterLocalPassiveMode();
                if (!FTPReply.isPositiveCompletion(ftp.getReplyCode())) {
                    throw new BuildException("could not enter into passive "
                         + "mode: " + ftp.getReplyString());
                }
            }
View Full Code Here

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

            if (binaryTransfer)
                ftp.setFileType(FTP.BINARY_FILE_TYPE);

            // Use passive mode as default because most of us are
            // behind firewalls these days.
            ftp.enterLocalPassiveMode();

            if (storeFile)
            {
                InputStream input;
View Full Code Here

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

            {
                if (ftp.login( getUsername(), getPassword())){
                    if (binaryTransfer) {
                        ftp.setFileType(FTP.BINARY_FILE_TYPE);
                    }
                    ftp.enterLocalPassiveMode();// should probably come from the setup dialog
                    boolean ftpOK=false;
                    if (isUpload()) {
                        String contents=getLocalFileContents();
                        if (contents.length() > 0){
                            byte bytes[] = contents.getBytes();// TODO this assumes local encoding
View Full Code Here

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

            replyString = client.getReplyString();
            client.logout();
            throw new IOException(replyString);
        }
        client.setFileType(FTP.BINARY_FILE_TYPE);
        client.enterLocalPassiveMode();

        final ByteArrayOutputStream os = new ByteArrayOutputStream();
        try {
            client.retrieveFile(path, os);
            client.logout();
View Full Code Here

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

                }
            }

            if (task.isPassive()) {
                task.log("entering passive mode", Project.MSG_VERBOSE);
                ftp.enterLocalPassiveMode();
                if (!FTPReply.isPositiveCompletion(ftp.getReplyCode())) {
                    throw new BuildException("could not enter into passive "
                                             + "mode: " + ftp.getReplyString());
                }
            }
View Full Code Here

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

                logger.logMessage("IOException while logging in to FTP server", this, MessageLogger.ERROR);
                PipeComponentUtils.failTransfer();
            }

            // Use passive mode
            ftp.enterLocalPassiveMode();

            // -----------------
            // ASCII or binary ?
            // -----------------
            boolean fileTypeSetOk = false;
View Full Code Here

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

                    MessageLogger.ERROR);
                PipeComponentUtils.failTransfer();
            }

            // Use passive mode
            ftp.enterLocalPassiveMode();

            // -----------------
            // ASCII or binary ?
            // -----------------
            boolean fileTypeSetOk = false;
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.