Java 类org.apache.commons.net.ftp.parser.NTFTPEntryParser 实例源码

项目:cyberduck    文件:FTPParserFactory.java   
private CompositeFileEntryParser createNTFTPEntryParser(final TimeZone timezone) {
    return new CompositeFileEntryParser(Arrays.asList(
            new NTFTPEntryParser() {
                @Override
                public FTPClientConfig getDefaultConfiguration() {
                    final FTPClientConfig config = super.getDefaultConfiguration();
                    config.setServerTimeZoneId(timezone.getID());
                    return config;
                }
            },
            this.createUnixFTPEntryParser(timezone)
    ));
}
项目:Camel    文件:OsgiParserFactory.java   
/**
 * Creates an NT FTP parser: if the config exists, and the system key equals
 * {@link FTPClientConfig#SYST_NT} then a plain {@link NTFTPEntryParser} is used,
 * otherwise a composite of {@link NTFTPEntryParser} and {@link UnixFTPEntryParser} is used.
 * @param config the config to use, may be {@code null}
 * @return the parser
 */
private FTPFileEntryParser createNTFTPEntryParser(FTPClientConfig config) {
    if (config != null && FTPClientConfig.SYST_NT.equals(
            config.getServerSystemKey())) {
        return new NTFTPEntryParser(config);
    } else {
        return new CompositeFileEntryParser(new FTPFileEntryParser[] {
            new NTFTPEntryParser(config),
            new UnixFTPEntryParser(config)
        });
    }
}
项目:xdm    文件:DefaultFTPFileEntryParserFactory.java   
private FTPFileEntryParser createNTFTPEntryParser(FTPClientConfig config) {
   return (FTPFileEntryParser)(config != null && "WINDOWS".equals(config.getServerSystemKey())?new NTFTPEntryParser(config):new CompositeFileEntryParser(new FTPFileEntryParser[]{new NTFTPEntryParser(config), new UnixFTPEntryParser(config)}));
}