Methods Summary |
---|
public void | configure(org.apache.commons.net.ftp.FTPClientConfig config)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.
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);
}
}
|
protected abstract org.apache.commons.net.ftp.FTPClientConfig | getDefaultConfiguration()Each concrete subclass must define this member to create
a default configuration to be used when that subclass is
instantiated without a {@link FTPClientConfig FTPClientConfig}
parameter being specified.
|
public java.util.Calendar | parseTimestamp(java.lang.String timestampStr)This method is called by the concrete parsers to delegate
timestamp parsing to the timestamp parser.
return this.timestampParser.parseTimestamp(timestampStr);
|