org.benow.web.path
Class FileBasedPathHandler

java.lang.Object
  extended by org.benow.web.path.PathHandler
      extended by org.benow.web.path.FileBasedPathHandler
Direct Known Subclasses:
DirectoryListingContentPathHandler, PagePathHandler, StaticContentPathHandler, ThemedImagePathHandler

public abstract class FileBasedPathHandler
extends PathHandler

A handler for files within the html/ directory. Includes beaccess processing.

Author:
andy

Field Summary
protected  java.io.File base
           
 
Fields inherited from class org.benow.web.path.PathHandler
CONTENT_LENGTH_UNKNOWN, LAST_MODIFIED_UNKNOWN, params, request, response
 
Constructor Summary
FileBasedPathHandler()
           
 
Method Summary
protected  void deliverFile(java.io.File toDeliver)
          Convenience method to send a file to the output.
protected  void deliverResource(java.lang.String requestPath, org.benow.java.packager.resource.ResourceEntry resource)
           
 
Methods inherited from class org.benow.web.path.PathHandler
canHandle, deliverHTML, deliverStream, deliverStream, deliverStream, handle, handle, handle, handle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

base

protected java.io.File base
Constructor Detail

FileBasedPathHandler

public FileBasedPathHandler()
Method Detail

deliverResource

protected void deliverResource(java.lang.String requestPath,
                               org.benow.java.packager.resource.ResourceEntry resource)
                        throws java.io.FileNotFoundException,
                               java.io.IOException
Throws:
java.io.FileNotFoundException
java.io.IOException

deliverFile

protected void deliverFile(java.io.File toDeliver)
                    throws java.io.FileNotFoundException,
                           java.io.IOException
Convenience method to send a file to the output. Includes setting last modified, cache control, mime type, etc.

Parameters:
out -
toDeliver -
Throws:
java.io.FileNotFoundException
java.io.IOException