org.apache.commons.net.ftp.parser
Class ConfigurableFTPFileEntryParserImpl
- Configurable, FTPFileEntryParser, FTPFileListParser
public abstract class ConfigurableFTPFileEntryParserImpl
To change the template for this generated type comment go to
Window - Preferences - Java - Code Style - Code Templates - Comments
ConfigurableFTPFileEntryParserImpl
public ConfigurableFTPFileEntryParserImpl(String regex)
Only constructor for this absract class.
regex
- Regular expression used main parsing of the
file listing.
configure
public void configure(FTPClientConfig config)
Implementation of the
Configurable
interface. Configures this parser by delegating to the
underlying Configurable FTPTimestampParser implementation, '
passing it the supplied
FTPClientConfig
if that is non-null or a default configuration defined by
each concrete subclass.
- configure in interface Configurable
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.
getDefaultConfiguration
protected abstract FTPClientConfig getDefaultConfiguration()
Each concrete subclass must define this member to create
a default configuration to be used when that subclass is
instantiated without a
FTPClientConfig
parameter being specified.
- the default configuration for the subclass.
parseTimestamp
public Calendar parseTimestamp(String timestampStr)
throws ParseException
This method is called by the concrete parsers to delegate
timestamp parsing to the timestamp parser.
timestampStr
- the timestamp string pulled from the
file listing by the regular expression parser, to be submitted
to the timestampParser
for extracting the timestamp.
- a
java.util.Calendar
containing results of the
timestamp parse.