org.apache.commons.pipeline.stage
Class FtpFileDownloadStage.FileNameMatchCriterion

java.lang.Object
  extended by org.apache.commons.pipeline.stage.FtpFileDownloadStage.FileNameMatchCriterion
All Implemented Interfaces:
FtpFileDownloadStage.Criterion
Enclosing class:
FtpFileDownloadStage

public static class FtpFileDownloadStage.FileNameMatchCriterion
extends Object
implements FtpFileDownloadStage.Criterion

Matches file names based upon the Java regex supplied in the constructor.


Constructor Summary
FtpFileDownloadStage.FileNameMatchCriterion(String pattern)
          Construct a new criterion to match on file names.
 
Method Summary
 boolean matches(org.apache.commons.net.ftp.FTPFile file)
          Test the given file's name against this criterion.
 String toString()
          Printable version of this Criterion indicating the Java regex used for filename matching.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FtpFileDownloadStage.FileNameMatchCriterion

public FtpFileDownloadStage.FileNameMatchCriterion(String pattern)
Construct a new criterion to match on file names.

Parameters:
pattern - Java regex pattern specifying acceptable file names
Method Detail

matches

public boolean matches(org.apache.commons.net.ftp.FTPFile file)
Test the given file's name against this criterion.

Specified by:
matches in interface FtpFileDownloadStage.Criterion
Parameters:
file - file to compare to
Returns:
true if the filename matches the filename pattern of this criterion, false otherwise

toString

public String toString()
Printable version of this Criterion indicating the Java regex used for filename matching.

Overrides:
toString in class Object
Returns:
a string containing the regex used to construct this filename criterion


Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.