org.apache.ftpserver.command.impl.listing
Class RegexFileFilter

java.lang.Object
  extended by org.apache.ftpserver.command.impl.listing.RegexFileFilter
All Implemented Interfaces:
FileFilter

public class RegexFileFilter
extends java.lang.Object
implements FileFilter

Internal class, do not use directly. Selects files which short name matches a regular expression

Version:
$Rev$, $Date$
Author:
The Apache MINA Project (dev@mina.apache.org)

Constructor Summary
RegexFileFilter(java.lang.String regex)
          Constructor with a regular expression
RegexFileFilter(java.lang.String regex, FileFilter wrappedFilter)
          Constructor with a wrapped filter, allows for chaining filters
 
Method Summary
 boolean accept(FtpFile file)
          Decide if the FtpFile should be selected
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegexFileFilter

public RegexFileFilter(java.lang.String regex)
Constructor with a regular expression

Parameters:
regex - The regular expression to select by

RegexFileFilter

public RegexFileFilter(java.lang.String regex,
                       FileFilter wrappedFilter)
Constructor with a wrapped filter, allows for chaining filters

Parameters:
regex - The regular expression to select by
wrappedFilter - The FileFilter to wrap
Method Detail

accept

public boolean accept(FtpFile file)
Description copied from interface: FileFilter
Decide if the FtpFile should be selected

Specified by:
accept in interface FileFilter
Parameters:
file - The FtpFile
Returns:
true if the FtpFile was selected
See Also:
FileFilter.accept(FtpFile)


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.