Package org.apache.commons.net.ftp

Examples of org.apache.commons.net.ftp.FTPClientConfig


     * parameter being specified.
     * @return the default configuration for this parser.
     */
    @Override
    protected FTPClientConfig getDefaultConfiguration() {
        return new FTPClientConfig(
                FTPClientConfig.SYST_OS2,
                DEFAULT_DATE_FORMAT,
                null, null, null, null);
    }
View Full Code Here


        testData = ("TESTDATA").getBytes("UTF-8");
        TestUtil.writeDataToFile(TEST_FILE, testData);
        assertTrue(TEST_FILE.exists());

        FTPClientConfig config = new FTPClientConfig("UNIX");
        client.configure(config);

        client.login(ADMIN_USERNAME, ADMIN_PASSWORD);
    }
View Full Code Here

    protected void setUp() throws Exception {
        super.setUp();

        testData = "TESDATA".getBytes("UTF-8");

        FTPClientConfig config = new FTPClientConfig("UNIX");
        client.configure(config);

        client.login(ADMIN_USERNAME, ADMIN_PASSWORD);
    }
View Full Code Here

        }

        if (ftpClientConfigParameters != null) {
            // client config is optional so create a new one if we have parameter for it
            if (ftpClientConfig == null) {
                ftpClientConfig = new FTPClientConfig();
            }
            IntrospectionSupport.setProperties(ftpClientConfig, ftpClientConfigParameters);
        }

        if (dataTimeout > 0) {
View Full Code Here

        }
       
        if (ftpClientConfigParameters != null) {
            // client config is optional so create a new one if we have parameter for it
            if (ftpClientConfig == null) {
                ftpClientConfig = new FTPClientConfig();
            }
            IntrospectionSupport.setProperties(ftpClientConfig, ftpClientConfigParameters);
        }

        if (dataTimeout > 0) {
View Full Code Here

        testData = ("TESTDATA").getBytes("UTF-8");
        TestUtil.writeDataToFile(TEST_FILE, testData);
        assertTrue(TEST_FILE.exists());


        FTPClientConfig config = new FTPClientConfig ("UNIX");
        client.configure(config);

        client.login(ADMIN_USERNAME, ADMIN_PASSWORD);
    }
View Full Code Here

    protected void setUp() throws Exception {
        super.setUp();

        testData = "TESDATA".getBytes("UTF-8");
       
        FTPClientConfig config = new FTPClientConfig ("UNIX");
        client.configure(config);

        client.login(ADMIN_USERNAME, ADMIN_PASSWORD);
    }
View Full Code Here

    private static void configureClient(FileSystemOptions fileSystemOptions, FTPClient client)
    {
        String key = FtpFileSystemConfigBuilder.getInstance().getEntryParser(fileSystemOptions);
        if (key != null)
        {
            FTPClientConfig config = new FTPClientConfig(key);

            String serverLanguageCode =
                FtpFileSystemConfigBuilder.getInstance().getServerLanguageCode(fileSystemOptions);
            if (serverLanguageCode != null)
            {
                config.setServerLanguageCode(serverLanguageCode);
            }
            String defaultDateFormat =
                FtpFileSystemConfigBuilder.getInstance().getDefaultDateFormat(fileSystemOptions);
            if (defaultDateFormat != null)
            {
                config.setDefaultDateFormatStr(defaultDateFormat);
            }
            String recentDateFormat =
                FtpFileSystemConfigBuilder.getInstance().getRecentDateFormat(fileSystemOptions);
            if (recentDateFormat != null)
            {
                config.setRecentDateFormatStr(recentDateFormat);
            }
            String serverTimeZoneId =
                FtpFileSystemConfigBuilder.getInstance().getServerTimeZoneId(fileSystemOptions);
            if (serverTimeZoneId != null)
            {
                config.setServerTimeZoneId(serverTimeZoneId);
            }
            String[] shortMonthNames =
                FtpFileSystemConfigBuilder.getInstance().getShortMonthNames(fileSystemOptions);
            if (shortMonthNames != null)
            {
                StringBuilder shortMonthNamesStr = new StringBuilder(BUFSZ);
                for (int i = 0; i < shortMonthNames.length; i++)
                {
                    if (shortMonthNamesStr.length() > 0)
                    {
                        shortMonthNamesStr.append("|");
                    }
                    shortMonthNamesStr.append(shortMonthNames[i]);
                }
                config.setShortMonthNames(shortMonthNamesStr.toString());
            }

            client.configure(config);
        }
    }
View Full Code Here

            }

                String key = FtpsFileSystemConfigBuilder.getInstance().getEntryParser(fileSystemOptions);
                if (key != null)
                {
                    FTPClientConfig config = new FTPClientConfig(key);

                    String serverLanguageCode = FtpsFileSystemConfigBuilder.getInstance().getServerLanguageCode(
                        fileSystemOptions);
                    if (serverLanguageCode != null)
                    {
                        config.setServerLanguageCode(serverLanguageCode);
                    }
                    String defaultDateFormat = FtpsFileSystemConfigBuilder.getInstance().getDefaultDateFormat(
                        fileSystemOptions);
                    if (defaultDateFormat != null)
                    {
                        config.setDefaultDateFormatStr(defaultDateFormat);
                    }
                    String recentDateFormat = FtpsFileSystemConfigBuilder.getInstance().getRecentDateFormat(
                        fileSystemOptions);
                    if (recentDateFormat != null)
                    {
                        config.setRecentDateFormatStr(recentDateFormat);
                    }
                    String serverTimeZoneId = FtpsFileSystemConfigBuilder.getInstance().getServerTimeZoneId(
                        fileSystemOptions);
                    if (serverTimeZoneId != null)
                    {
                        config.setServerTimeZoneId(serverTimeZoneId);
                    }
                    String[] shortMonthNames = FtpsFileSystemConfigBuilder.getInstance().getShortMonthNames(
                        fileSystemOptions);
                    if (shortMonthNames != null)
                    {
                        StringBuilder shortMonthNamesStr = new StringBuilder(40);
                        for (int i = 0; i < shortMonthNames.length; i++)
                        {
                            if (shortMonthNamesStr.length() > 0)
                            {
                                shortMonthNamesStr.append("|");
                            }
                            shortMonthNamesStr.append(shortMonthNames[i]);
                        }
                        config.setShortMonthNames(shortMonthNamesStr.toString());
                    }

                    client.configure(config);
                }
View Full Code Here

        }
       
        if (ftpClientConfigParameters != null) {
            // client config is optional so create a new one if we have parameter for it
            if (ftpClientConfig == null) {
                ftpClientConfig = new FTPClientConfig();
            }
            IntrospectionSupport.setProperties(ftpClientConfig, ftpClientConfigParameters);
        }

        FtpOperations operations = new FtpOperations(client, getFtpClientConfig());
View Full Code Here

TOP

Related Classes of org.apache.commons.net.ftp.FTPClientConfig

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.