Send the resource's content using the given output stream. Implementations should assume that bytes are being physically transmitted and that headers have already been committed, although this might not be the case with all web containers.
This method will be used to serve GET requests, and also to generate content following POST requests (if they have not redirected)
The Range argument is not-null for partial content requests. In this case implementations should (but are not required) to only send the data range requested.
The contentType argument is that which was resolved by negotiation in the getContentType method. HTTP allows a given resource to have multiple representations on the same URL. For example, a data series could be retrieved as a chart as SVG, PNG, JPEG, or as text as CSV or XML. When the user agent requests the resource is specified what content types it can accept. These are matched against those that can be provided by the server and a preferred representation is selected. That contentType is set in the response header and is provided here so that the resource implementation can render itself appropriately.
@param out - the output stream to send the content to
@param range - null for normal GET's, not null for partial GET's. May be ignored
@param params - request parameters
@param contentType - the contentType selected by negotiation
@throws java.io.IOException - if there is an exception writing content to the output stream. Thisindicates that the client has disconnected (as frequently occurs with http transfers). DO NOT throw an IOException if there was an internal error generating the response (eg if reading from a database)
@throws com.bradmcevoy.http.exceptions.NotAuthorizedException