net.sourceforge.pebble.web.view
Class FileView

java.lang.Object
  extended by net.sourceforge.pebble.web.view.View
      extended by net.sourceforge.pebble.web.view.BinaryView
          extended by net.sourceforge.pebble.web.view.FileView

public class FileView
extends BinaryView

Represents a binary view component and prepares the model for display.

Author:
Simon Brown

Constructor Summary
FileView(java.io.File file)
           
 
Method Summary
 void dispatch(HttpServletRequest request, HttpServletResponse response, ServletContext context)
          Dispatches this view.
 long getContentLength()
           
 java.lang.String getContentType()
          Gets the title of this view.
 
Methods inherited from class net.sourceforge.pebble.web.view.View
getModel, getServletContext, prepare, setModel, setServletContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileView

public FileView(java.io.File file)
Method Detail

getContentType

public java.lang.String getContentType()
Gets the title of this view.

Specified by:
getContentType in class View
Returns:
the title as a String

getContentLength

public long getContentLength()
Specified by:
getContentLength in class BinaryView

dispatch

public void dispatch(HttpServletRequest request,
                     HttpServletResponse response,
                     ServletContext context)
              throws ServletException
Dispatches this view.

Specified by:
dispatch in class View
Parameters:
request - the HttpServletRequest instance
response - the HttpServletResponse instance
context -
Throws:
ServletException


Copyright © 2003-2006, Simon Brown. All Rights Reserved.