/** * <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); }
throw new ParserInitializationException("Parser key cannot be null"); return createFileEntryParser(key, 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); }
/** * <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); }