org.benow.web.path.file
Class DirectoryListingContentPathHandler

java.lang.Object
  extended by org.benow.web.path.PathHandler
      extended by org.benow.web.path.FileBasedPathHandler
          extended by org.benow.web.path.file.DirectoryListingContentPathHandler

public class DirectoryListingContentPathHandler
extends FileBasedPathHandler


Field Summary
 
Fields inherited from class org.benow.web.path.FileBasedPathHandler
base
 
Fields inherited from class org.benow.web.path.PathHandler
CONTENT_LENGTH_UNKNOWN, LAST_MODIFIED_UNKNOWN, params, request, response
 
Constructor Summary
DirectoryListingContentPathHandler()
           
 
Method Summary
 boolean canHandle(java.lang.String path)
          Return true if the handler can handle the given path.
protected  void doListing(java.io.PrintWriter out, java.lang.String path)
           
protected  java.lang.Object handle(java.io.PrintWriter w)
           
 
Methods inherited from class org.benow.web.path.FileBasedPathHandler
deliverFile, deliverResource
 
Methods inherited from class org.benow.web.path.PathHandler
deliverHTML, deliverStream, deliverStream, deliverStream, handle, handle, handle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryListingContentPathHandler

public DirectoryListingContentPathHandler()
Method Detail

canHandle

public boolean canHandle(java.lang.String path)
Description copied from class: PathHandler
Return true if the handler can handle the given path. Path is in format /dir/childdir/item.ext. It will never be null and will always start with a /.

Specified by:
canHandle in class PathHandler
Returns:

handle

protected java.lang.Object handle(java.io.PrintWriter w)
                           throws java.io.IOException,
                                  WebException
Overrides:
handle in class PathHandler
Throws:
java.io.IOException
WebException

doListing

protected void doListing(java.io.PrintWriter out,
                         java.lang.String path)
                  throws java.io.IOException,
                         WebException
Throws:
java.io.IOException
WebException