ikrs.httpd
Class AbstractFileFilter

java.lang.Object
  extended by ikrs.httpd.AbstractFileFilter
All Implemented Interfaces:
HTTPFileFilter
Direct Known Subclasses:
DefaultFileFilter

public abstract class AbstractFileFilter
extends java.lang.Object
implements HTTPFileFilter

An abstract file filter for directory listings and direct file access. This class has an 'acceptFile' method similar to the java.io.FileFilter.accept method and an additional 'acceptListing' for the case a file is allowed to be listet in directory listings but not downloadable (accessible).


Constructor Summary
AbstractFileFilter()
           
 
Method Summary
abstract  boolean acceptAccess(java.io.File file)
          This method should return false if the passed file is not accessible due to security or other reasons.
abstract  boolean acceptListing(java.io.File file)
          This method should return false if the passed file is not allowed to be listed in directory listings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFileFilter

public AbstractFileFilter()
Method Detail

acceptAccess

public abstract boolean acceptAccess(java.io.File file)
This method should return false if the passed file is not accessible due to security or other reasons.

Specified by:
acceptAccess in interface HTTPFileFilter
Parameters:
file - The file the user want's to access.
Returns:
true If the file may be accessed.

acceptListing

public abstract boolean acceptListing(java.io.File file)
This method should return false if the passed file is not allowed to be listed in directory listings.

Specified by:
acceptListing in interface HTTPFileFilter
Parameters:
file - The file the user want's to access.
Returns:
true If the file may be accessed.