/** * Default FTPClient constructor. Creates a new FTPClient instance * with the data connection mode set to * <code> ACTIVE_LOCAL_DATA_CONNECTION_MODE </code>, the file type * set to <code> FTP.ASCII_FILE_TYPE </code>, the * file format set to <code> FTP.NON_PRINT_TEXT_FORMAT </code>, * the file structure set to <code> FTP.FILE_STRUCTURE </code>, and * the transfer mode set to <code> FTP.STREAM_TRANSFER_MODE </code>. * <p> * The list parsing auto-detect feature can be configured to use lenient future * dates (short dates may be up to one day in the future) as follows: * <pre> * FTPClient ftp = new FTPClient(); * FTPClientConfig config = new FTPClientConfig(); * config.setLenientFutureDates(true); * ftp.configure(config ); * </pre> */ public FTPClient() { __initDefaults(); __dataTimeout = -1; __remoteVerificationEnabled = true; __parserFactory = new DefaultFTPFileEntryParserFactory(); __configuration = null; __listHiddenFiles = false; __useEPSVwithIPv4 = false; __random = new Random(); __passiveLocalHost = null; }
/** * <p>Implementation extracts a key from the supplied * {@link FTPClientConfig FTPClientConfig} * parameter and creates an object implementing the * interface FTPFileEntryParser and uses the supplied configuration * to configure it. * </p><p> * Note that this method will generally not be called in scenarios * that call for autodetection of parser type but rather, for situations * where the user knows that the server uses a non-default configuration * and knows what that configuration is. * </p> * @param config A {@link FTPClientConfig FTPClientConfig} * used to configure the parser created * * @return the @link FTPFileEntryParser FTPFileEntryParser} so created. * @throws ParserInitializationException * Thrown on any exception in instantiation * @throws NullPointerException if {@code config} is {@code null} * @since 1.4 */ @Override public FTPFileEntryParser createFileEntryParser(FTPClientConfig config) throws ParserInitializationException { String key = config.getServerSystemKey(); return createFileEntryParser(key, config); }
public FTPFileEntryParser createNTFTPEntryParser() { return createNTFTPEntryParser(null); }
parser = createUnixFTPEntryParser(); parser = createVMSVersioningFTPEntryParser(); parser = createNTFTPEntryParser(); parser = createOS2FTPEntryParser(); parser = createOS400FTPEntryParser(); parser = createMVSEntryParser();
parser = createNTFTPEntryParser(config); ukey.indexOf(FTPClientConfig.SYST_AS400) >= 0) parser = createOS400FTPEntryParser(config);
public FTPFileEntryParser createOS400FTPEntryParser() { return createOS400FTPEntryParser(null); }
|| (ukey.indexOf(FTPClientConfig.SYST_L8) >= 0)) parser = createUnixFTPEntryParser(); parser = createVMSVersioningFTPEntryParser(); parser = createNTFTPEntryParser(); parser = createOS2FTPEntryParser(); parser = createOS400FTPEntryParser(); parser = createMVSEntryParser(); parser = createNetwareFTPEntryParser();
throw new ParserInitializationException("Parser key cannot be null"); return createFileEntryParser(key, null);
/*** * Default FTPClient constructor. Creates a new FTPClient instance * with the data connection mode set to * <code> ACTIVE_LOCAL_DATA_CONNECTION_MODE </code>, the file type * set to <code> FTP.ASCII_FILE_TYPE </code>, the * file format set to <code> FTP.NON_PRINT_TEXT_FORMAT </code>, * the file structure set to <code> FTP.FILE_STRUCTURE </code>, and * the transfer mode set to <code> FTP.STREAM_TRANSFER_MODE </code>. ***/ public FTPClient() { __initDefaults(); __dataTimeout = -1; __remoteVerificationEnabled = true; __parserFactory = new DefaultFTPFileEntryParserFactory(); __configuration = null; __listHiddenFiles = false; }
/** * <p>Implementation extracts a key from the supplied * {@link FTPClientConfig FTPClientConfig} * parameter and creates an object implementing the * interface FTPFileEntryParser and uses the supplied configuration * to configure it. * </p><p> * Note that this method will generally not be called in scenarios * that call for autodetection of parser type but rather, for situations * where the user knows that the server uses a non-default configuration * and knows what that configuration is. * </p> * @param config A {@link FTPClientConfig FTPClientConfig} * used to configure the parser created * * @return the @link FTPFileEntryParser FTPFileEntryParser} so created. * @exception ParserInitializationException * Thrown on any exception in instantiation * @since 1.4 */ public FTPFileEntryParser createFileEntryParser(FTPClientConfig config) throws ParserInitializationException { this.config = config; String key = config.getServerSystemKey(); return createFileEntryParser(key); }
/*** * Default FTPClient constructor. Creates a new FTPClient instance * with the data connection mode set to * <code> ACTIVE_LOCAL_DATA_CONNECTION_MODE </code>, the file type * set to <code> FTP.ASCII_FILE_TYPE </code>, the * file format set to <code> FTP.NON_PRINT_TEXT_FORMAT </code>, * the file structure set to <code> FTP.FILE_STRUCTURE </code>, and * the transfer mode set to <code> FTP.STREAM_TRANSFER_MODE </code>. ***/ public FTPClient() { __initDefaults(); __dataTimeout = -1; __remoteVerificationEnabled = true; __parserFactory = new DefaultFTPFileEntryParserFactory(); __configuration = null; }
/** * <p>Implementation extracts a key from the supplied * {@link FTPClientConfig FTPClientConfig} * parameter and creates an object implementing the * interface FTPFileEntryParser and uses the supplied configuration * to configure it. * </p><p> * Note that this method will generally not be called in scenarios * that call for autodetection of parser type but rather, for situations * where the user knows that the server uses a non-default configuration * and knows what that configuration is. * </p> * @param config A {@link FTPClientConfig FTPClientConfig} * used to configure the parser created * * @return the @link FTPFileEntryParser FTPFileEntryParser} so created. * @exception ParserInitializationException * Thrown on any exception in instantiation * @since 1.4 */ public FTPFileEntryParser createFileEntryParser(FTPClientConfig config) throws ParserInitializationException { this.config = config; String key = config.getServerSystemKey(); return createFileEntryParser(key); }