public class InputStreamView extends Object implements View
Constructor and Description |
---|
InputStreamView(InputStream in,
String contentType) |
Modifier and Type | Method and Description |
---|---|
void |
render(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This method is invoked last in the sequence of steps involved in
processing a request sent to the FrontController.
|
void |
setBufferSize(int bufferSize)
Set the buffer size to use a different buffer size
from the default (1024 * 4).
|
void |
setContentLength(int contentLength)
Set the content length if it is known beforehand.
|
public InputStreamView(InputStream in, String contentType)
public void setContentLength(int contentLength)
contentLength
- public void setBufferSize(int bufferSize)
bufferSize
- public void render(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
View
This method is invoked last in the sequence of steps involved in processing a request sent to the FrontController. The servlet request can be used to set any attributes, then to obtain a RequestDispatcher for forwarding or including, or the servlet response may be used to send a redirect, for example.
Users should note that any exceptions thrown from this method are not guaranteed to be caught in the FrontController. They may escape to the requestor. Users should handle any exceptions inside the implementation of this method if different behaviour is desired.
render
in interface View
request
- the servlet requestresponse
- the servlet responsejavax.servlet.ServletException
IOException
Copyright © 2011-2012 MojaveMVC.org