Class ConfigurableFTPFileEntryParserImpl
- java.lang.Object
-
- org.apache.commons.net.ftp.FTPFileEntryParserImpl
-
- org.apache.commons.net.ftp.parser.RegexFTPFileEntryParserImpl
-
- org.apache.commons.net.ftp.parser.ConfigurableFTPFileEntryParserImpl
-
- All Implemented Interfaces:
Configurable
,FTPFileEntryParser
,FTPFileListParser
- Direct Known Subclasses:
MVSFTPEntryParser
,NTFTPEntryParser
,OS2FTPEntryParser
,OS400FTPEntryParser
,UnixFTPEntryParser
,VMSFTPEntryParser
public abstract class ConfigurableFTPFileEntryParserImpl extends RegexFTPFileEntryParserImpl implements Configurable
To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates - Comments
-
-
Field Summary
-
Fields inherited from class org.apache.commons.net.ftp.parser.RegexFTPFileEntryParserImpl
_matcher_
-
-
Constructor Summary
Constructors Constructor Description ConfigurableFTPFileEntryParserImpl(java.lang.String regex)
Only constructor for this absract class.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
configure(FTPClientConfig config)
Implementation of theConfigurable
interface.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 aFTPClientConfig
parameter being specified.java.util.Calendar
parseTimestamp(java.lang.String timestampStr)
This method is called by the concrete parsers to delegate timestamp parsing to the timestamp parser.-
Methods inherited from class org.apache.commons.net.ftp.parser.RegexFTPFileEntryParserImpl
getGroupCnt, getGroupsAsString, group, matches
-
Methods inherited from class org.apache.commons.net.ftp.FTPFileEntryParserImpl
parseFileList, parseFileList, preParse, readNextEntry
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.commons.net.ftp.FTPFileEntryParser
parseFTPEntry
-
-
-
-
Method Detail
-
parseTimestamp
public java.util.Calendar parseTimestamp(java.lang.String timestampStr) throws java.text.ParseException
This method is called by the concrete parsers to delegate timestamp parsing to the timestamp parser.- Parameters:
timestampStr
- the timestamp string pulled from the file listing by the regular expression parser, to be submitted to thetimestampParser
for extracting the timestamp.- Returns:
- a
java.util.Calendar
containing results of the timestamp parse. - Throws:
java.text.ParseException
-
configure
public void configure(FTPClientConfig config)
Implementation of theConfigurable
interface. Configures this parser by delegating to the underlying Configurable FTPTimestampParser implementation, ' passing it the suppliedFTPClientConfig
if that is non-null or a default configuration defined by each concrete subclass.- Specified by:
configure
in interfaceConfigurable
- Parameters:
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 aFTPClientConfig
parameter being specified.- Returns:
- the default configuration for the subclass.
-
-