/** * Creates an OS400 FTP parser: if the config exists, and the system key equals * {@link FTPClientConfig.SYST_OS400} then a plain {@link OS400FTPEntryParser} is used, * otherwise a composite of {@link OS400FTPEntryParser} and {@link UnixFTPEntryParser} is used. * @param config the config to use, may be {@code null} * @return the parser */ private FTPFileEntryParser createOS400FTPEntryParser(FTPClientConfig config) { if (config != null && FTPClientConfig.SYST_OS400.equals(config.getServerSystemKey())) { return new OS400FTPEntryParser(config); } else { // clone the config as it may be changed by the parsers (NET-602) final FTPClientConfig config2 = (config != null) ? new FTPClientConfig(config) : null; return new CompositeFileEntryParser(new FTPFileEntryParser[] { new OS400FTPEntryParser(config), new UnixFTPEntryParser(config2, config2 != null && FTPClientConfig.SYST_UNIX_TRIM_LEADING.equals(config2.getServerSystemKey())) }); } }
public FTPFileEntryParser createOS400FTPEntryParser() { if (config != null && FTPClientConfig.SYST_OS400.equals(config.getServerSystemKey())) { return new OS400FTPEntryParser(); } else { return new CompositeFileEntryParser(new FTPFileEntryParser[] { new OS400FTPEntryParser(), new UnixFTPEntryParser() }); } }
public FTPFileEntryParser createOS400FTPEntryParser() { if (config != null && FTPClientConfig.SYST_OS400.equals(config.getServerSystemKey())) { return new OS400FTPEntryParser(); } else { return new CompositeFileEntryParser(new FTPFileEntryParser[] { new OS400FTPEntryParser(), new UnixFTPEntryParser() }); } }
/** * Creates an OS400 FTP parser: if the config exists, and the system key equals * {@link FTPClientConfig#SYST_OS400} then a plain {@link OS400FTPEntryParser} is used, * otherwise a composite of {@link OS400FTPEntryParser} and {@link UnixFTPEntryParser} is used. * @param config the config to use, may be {@code null} * @return the parser */ private FTPFileEntryParser createOS400FTPEntryParser(FTPClientConfig config) { if (config != null && FTPClientConfig.SYST_OS400.equals(config.getServerSystemKey())) { return new OS400FTPEntryParser(config); } else { return new CompositeFileEntryParser(new FTPFileEntryParser[] { new OS400FTPEntryParser(config), new UnixFTPEntryParser(config) }); } } }