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

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

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

Matches files by matching their filesystem timestamp to a date range.


Constructor Summary
FtpFileDownloadStage.FileDateMatchCriterion(Date startDate, Date endDate)
          Construct a new criterion to match file timestamp to a range of dates.
 
Method Summary
 boolean matches(org.apache.commons.net.ftp.FTPFile file)
          Test the given file's date against this criterion.
 String toString()
          Printable version of this Criterion indicating the inclusive date range used for file date matching.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FtpFileDownloadStage.FileDateMatchCriterion

public FtpFileDownloadStage.FileDateMatchCriterion(Date startDate,
                                                   Date endDate)
Construct a new criterion to match file timestamp to a range of dates.

Parameters:
startDate - starting date (inclusive) of the date range
endDate - ending date (inclusive) of the date range
Method Detail

matches

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

Specified by:
matches in interface FtpFileDownloadStage.Criterion
Parameters:
file - file to compare to
Returns:
true if the file date falls into the time window of [startDate, endDate], false otherwise

toString

public String toString()
Printable version of this Criterion indicating the inclusive date range used for file date matching.

Overrides:
toString in class Object
Returns:
a string noting the startDate and endDate


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