com.aoindustries.website.framework
Class FilePage

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.aoindustries.website.framework.ErrorReportingServlet
              extended by com.aoindustries.website.framework.WebPage
                  extended by com.aoindustries.website.framework.FilePage
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
PreFilePage

public abstract class FilePage
extends WebPage

Pulls information from a file to be used as the content.

Author:
AO Industries, Inc.
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.aoindustries.website.framework.WebPage
emptyWebPageArray, reHTMLPattern
 
Fields inherited from class com.aoindustries.website.framework.ErrorReportingServlet
BUFFER_SIZE
 
Constructor Summary
FilePage(LoggerAccessor loggerAccessor)
           
FilePage(LoggerAccessor loggerAccessor, java.lang.Object param)
           
FilePage(WebSiteRequest req)
           
 
Method Summary
 void doGet(com.aoindustries.io.ChainWriter out, WebSiteRequest req, javax.servlet.http.HttpServletResponse resp)
          By default, GET provides no content.
abstract  java.io.File getFile()
          Gets the file that the text should be read from.
 long getLastModified(WebSiteRequest req)
          The getLastModified defaults to -1.
static void printFile(com.aoindustries.io.ChainWriter out, java.io.File file)
           
 
Methods inherited from class com.aoindustries.website.framework.WebPage
canAccess, doGet, doPost, doPost, doPostWithSearch, enforceEncryption, equals, equals, generateURLPath, getAdditionalHeaders, getAuthor, getCachedPages, getClassLastModified, getClassLoaderUptime, getContentVAlign, getCopyright, getDescription, getHTMLChainWriter, getHTMLOutputStream, getJavaScriptSrc, getKeywords, getLastModifiedRecursive, getLastModifiedRecursive, getNavImageAlt, getNavImageSuffix, getNavImageURL, getNextPage, getOnloadScript, getPageIndexInParent, getParent, getPreferredContentWidth, getPreviousPage, getRedirectURL, getRootPage, getSearchLastModified, getServletContext, getShortTitle, getTitle, getURLParams, getURLPath, getURLPattern, getWebPage, getWebPage, getWebPage, getWebPage, getWebPageAndChildrenLastModified, getWebPageLayout, getWebPages, getWebSiteRequest, hashCode, includeNavImageAsParent, isHandler, isHandler, loadClass, printLoginForm, printUnauthorizedPage, reportingDoGet, reportingDoPost, reportingGetLastModified, search, showInLocationPath, standardSearch, useEncryption, useNavImage, useSiteMap
 
Methods inherited from class com.aoindustries.website.framework.ErrorReportingServlet
doGet, doPost, getGetCount, getLastModified, getLastModifiedCount, getLogger, getLogger, getLogger, getLoggerAccessor, getPostCount, getUptime, log, log
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletInfo, getServletName, init, init
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilePage

public FilePage(LoggerAccessor loggerAccessor)

FilePage

public FilePage(WebSiteRequest req)

FilePage

public FilePage(LoggerAccessor loggerAccessor,
                java.lang.Object param)
Method Detail

doGet

public void doGet(com.aoindustries.io.ChainWriter out,
                  WebSiteRequest req,
                  javax.servlet.http.HttpServletResponse resp)
           throws java.io.IOException,
                  java.sql.SQLException
Description copied from class: WebPage
By default, GET provides no content.

Overrides:
doGet in class WebPage
Parameters:
out - the ChainWriter to send output to
req - the current WebSiteRequest
resp - the HttpServletResponse for this request, is null when searching
Throws:
java.io.IOException
java.sql.SQLException

getFile

public abstract java.io.File getFile()
                              throws java.io.IOException
Gets the file that the text should be read from.

Throws:
java.io.IOException

getLastModified

public long getLastModified(WebSiteRequest req)
                     throws java.io.IOException,
                            java.sql.SQLException
Description copied from class: WebPage
The getLastModified defaults to -1.

Overrides:
getLastModified in class WebPage
Throws:
java.io.IOException
java.sql.SQLException

printFile

public static void printFile(com.aoindustries.io.ChainWriter out,
                             java.io.File file)
                      throws java.io.IOException
Throws:
java.io.IOException