org.apache.commons.net.ftp.parser
public abstract class RegexFTPFileEntryParserImpl extends FTPFileEntryParserImpl
Field Summary | |
---|---|
protected PatternMatcher | _matcher_
Internal PatternMatcher object used by the parser. |
Constructor Summary | |
---|---|
RegexFTPFileEntryParserImpl(String regex)
The constructor for a RegexFTPFileEntryParserImpl object.
|
Method Summary | |
---|---|
int | getGroupCnt()
Convenience method delegates to the internal MatchResult's groups()
method.
|
String | getGroupsAsString()
For debugging purposes - returns a string shows each match group by
number.
|
String | group(int matchnum)
Convenience method delegates to the internal MatchResult's group()
method.
|
boolean | matches(String s)
Convenience method delegates to the internal MatchResult's matches()
method.
|
Parameters: regex The regular expression with which this object is initialized.
Throws: IllegalArgumentException Thrown if the regular expression is unparseable. Should not be seen in normal conditions. It it is seen, this is a sign that a subclass has been created with a bad regular expression. Since the parser must be created before use, this means that any bad parser subclasses created from this will bomb very quickly, leading to easy detection.
Returns: the number of groups() in the internal MatchResult.
Returns: a string shows each match group by number.
Parameters: matchnum match group number to be retrieved
Returns: the content of the matchnum'th
group of the internal
match or null if this method is called without a match having
been made.
Parameters: s the String to be matched
Returns: true if s matches this object's regular expression.