/** * constructor for this abstract class. * @param regex Regular expression used main parsing of the * file listing. */ public ConfigurableFTPFileEntryParserImpl(String regex) { super(regex); this.timestampParser = new FTPTimestampParserImpl(); }
/** * constructor for this abstract class. * @param regex Regular expression used main parsing of the * file listing. * @param flags the flags to apply, see * {@link java.util.regex.Pattern#compile(String, int) Pattern#compile(String, int)}. Use 0 for none. * @since 3.4 */ public ConfigurableFTPFileEntryParserImpl(String regex, int flags) { super(regex, flags); this.timestampParser = new FTPTimestampParserImpl(); }
/** * This constructor allows the creation of an NTFTPEntryParser object * with something other than the default configuration. * * @param config The {@link FTPClientConfig configuration} object used to * configure this parser. * @throws IllegalArgumentException * Thrown if the regular expression is unparseable. Should not be seen * under normal conditions. It it is seen, this is a sign that * <code>REGEX</code> is not a valid regular expression. * @since 1.4 */ public NTFTPEntryParser(FTPClientConfig config) { super(REGEX, Pattern.DOTALL); configure(config); FTPClientConfig config2 = new FTPClientConfig( FTPClientConfig.SYST_NT, DEFAULT_DATE_FORMAT2, null); config2.setDefaultDateFormatStr(DEFAULT_DATE_FORMAT2); this.timestampParser = new FTPTimestampParserImpl(); ((Configurable)this.timestampParser).configure(config2); }
/** * Only constructor for this absract class. * @param regex Regular expression used main parsing of the * file listing. */ public ConfigurableFTPFileEntryParserImpl(String regex) { super(regex); this.timestampParser = new FTPTimestampParserImpl(); }
/** * Only constructor for this absract class. * @param regex Regular expression used main parsing of the * file listing. */ public ConfigurableFTPFileEntryParserImpl(String regex) { super(regex); this.timestampParser = new FTPTimestampParserImpl(); }
FTPTimestampParserImpl jaParser = new FTPTimestampParserImpl(); jaParser.configure(new FTPClientConfig( FTPClientConfig.SYST_UNIX, DEFAULT_DATE_FORMAT_JA, DEFAULT_RECENT_DATE_FORMAT_JA));