try f.setTimestamp(super.parseTimestamp(datestr));
/** * The sole constructor for a MVSFTPEntryParser object. * */ public MVSFTPEntryParser() { super(""); // note the regex is set in preParse. super.configure(null); // configure parser with default configurations }
if (header.indexOf("Volume") >= 0 && header.indexOf("Dsname") >= 0) { setType(FILE_LIST_TYPE); super.setRegex(FILE_LIST_REGEX); } else if (header.indexOf("Name") >= 0 && header.indexOf("Id") >= 0) { setType(MEMBER_LIST_TYPE); super.setRegex(MEMBER_LIST_REGEX); } else if (header.indexOf("total") == 0) { setType(UNIX_LIST_TYPE); } else if (header.indexOf("Spool Files") >= 30) { setType(JES_LEVEL_1_LIST_TYPE); super.setRegex(JES_LEVEL_1_LIST_REGEX); } else if (header.indexOf("JOBNAME") == 0 && header.indexOf("JOBID") > 8) {// header contains JOBNAME JOBID OWNER // STATUS CLASS setType(JES_LEVEL_2_LIST_TYPE); super.setRegex(JES_LEVEL_2_LIST_REGEX); } else { setType(UNKNOWN_LIST_TYPE);
/** * Implementation of the {@link Configurable Configurable} * interface. Configures this parser by delegating to the * underlying Configurable FTPTimestampParser implementation, ' * passing it the supplied {@link FTPClientConfig FTPClientConfig} * if that is non-null or a default configuration defined by * each concrete subclass. * * @param config the configuration to be used to configure this parser. * If it is null, a default configuration defined by * each concrete subclass is used instead. */ @Override public void configure(FTPClientConfig config) { if (this.timestampParser instanceof Configurable) { FTPClientConfig defaultCfg = getDefaultConfiguration(); if (config != null) { if (null == config.getDefaultDateFormatStr()) { config.setDefaultDateFormatStr(defaultCfg.getDefaultDateFormatStr()); } if (null == config.getRecentDateFormatStr()) { config.setRecentDateFormatStr(defaultCfg.getRecentDateFormatStr()); } ((Configurable)this.timestampParser).configure(config); } else { ((Configurable)this.timestampParser).configure(defaultCfg); } } }
/** * Implementation of the {@link Configurable Configurable} * interface. Configures this parser by delegating to the * underlying Configurable FTPTimestampParser implementation, ' * passing it the supplied {@link FTPClientConfig FTPClientConfig} * if that is non-null or a default configuration defined by * each concrete subclass. * </p> * @param config the configuration to be used to configure this parser. * If it is null, a default configuration defined by * each concrete subclass is used instead. */ public void configure(FTPClientConfig config) { if (this.timestampParser instanceof Configurable) { FTPClientConfig defaultCfg = getDefaultConfiguration(); if (config != null) { if (null == config.getDefaultDateFormatStr()) { config.setDefaultDateFormatStr(defaultCfg.getDefaultDateFormatStr()); } if (null == config.getRecentDateFormatStr()) { config.setRecentDateFormatStr(defaultCfg.getRecentDateFormatStr()); } ((Configurable)this.timestampParser).configure(config); } else { ((Configurable)this.timestampParser).configure(defaultCfg); } } }
f.setTimestamp(super.parseTimestamp(datestr)); } catch (ParseException e) {
/** * Implementation of the {@link Configurable Configurable} * interface. Configures this parser by delegating to the * underlying Configurable FTPTimestampParser implementation, ' * passing it the supplied {@link FTPClientConfig FTPClientConfig} * if that is non-null or a default configuration defined by * each concrete subclass. * </p> * @param config the configuration to be used to configure this parser. * If it is null, a default configuration defined by * each concrete subclass is used instead. */ public void configure(FTPClientConfig config) { if (this.timestampParser instanceof Configurable) { FTPClientConfig defaultCfg = getDefaultConfiguration(); if (config != null) { if (null == config.getDefaultDateFormatStr()) { config.setDefaultDateFormatStr(defaultCfg.getDefaultDateFormatStr()); } if (null == config.getRecentDateFormatStr()) { config.setRecentDateFormatStr(defaultCfg.getRecentDateFormatStr()); } ((Configurable)this.timestampParser).configure(config); } else { ((Configurable)this.timestampParser).configure(defaultCfg); } } }
/** * The sole constructor for a MVSFTPEntryParser object. * */ public MVSFTPEntryParser() { super(""); // note the regex is set in preParse. super.configure(null); // configure parser with default configurations }
if (header.indexOf("Volume") >= 0 && header.indexOf("Dsname") >= 0) { setType(FILE_LIST_TYPE); super.setRegex(FILE_LIST_REGEX); } else if (header.indexOf("Name") >= 0 && header.indexOf("Id") >= 0) { setType(MEMBER_LIST_TYPE); super.setRegex(MEMBER_LIST_REGEX); } else if (header.indexOf("total") == 0) { setType(UNIX_LIST_TYPE); } else if (header.indexOf("Spool Files") >= 30) { setType(JES_LEVEL_1_LIST_TYPE); super.setRegex(JES_LEVEL_1_LIST_REGEX); } else if (header.indexOf("JOBNAME") == 0 && header.indexOf("JOBID") > 8) {// header contains JOBNAME JOBID OWNER // STATUS CLASS setType(JES_LEVEL_2_LIST_TYPE); super.setRegex(JES_LEVEL_2_LIST_REGEX); } else { setType(UNKNOWN_LIST_TYPE);
try f.setTimestamp(super.parseTimestamp(datestr));
file.setTimestamp(super.parseTimestamp(datestr));
file.setType(FTPFile.FILE_TYPE); try { file.setTimestamp(super.parseTimestamp(datestr)); } catch (ParseException e) { e.printStackTrace();
try f.setTimestamp(super.parseTimestamp(datestr));
file.setTimestamp(super.parseTimestamp(datestr));
file.setTimestamp(jaParser.parseTimestamp(datestr)); } else { file.setTimestamp(super.parseTimestamp(datestr));
try f.setTimestamp(super.parseTimestamp(datestr));
file.setTimestamp(super.parseTimestamp(datestr));
try f.setTimestamp(super.parseTimestamp(datestr));
file.setTimestamp(super.parseTimestamp(datestr));
f.setTimestamp(super.parseTimestamp(datestr)); } catch (ParseException e) {