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);
}
}