public class ZipFileListResponseHandler extends Object implements ResponseHandler
Can be associated with a REST resource using the RestResource.responseHandlers()
annotation.
Sets the following headers:
Content-Type
- application/zip
Content-Disposition=attachment;filename=X
- Sets X to the file name passed in through the
constructor ZipFileList.ZipFileList(String)
.
Constructor and Description |
---|
ZipFileListResponseHandler() |
Modifier and Type | Method and Description |
---|---|
boolean |
handle(RestRequest req,
RestResponse res,
Object output)
Process this response if possible.
|
public ZipFileListResponseHandler()
public boolean handle(RestRequest req, RestResponse res, Object output) throws IOException, RestException
ResponseHandler
handle
in interface ResponseHandler
req
- The HTTP servlet request.res
- The HTTP servlet response;output
- The POJO returned by the REST method that now needs to be sent to the response.IOException
- If low-level exception occurred on output stream.
Results in a HttpServletResponse.SC_INTERNAL_SERVER_ERROR
error.RestException
- If some other exception occurred.
Can be used to provide an appropriate HTTP response code and message.Copyright © 2018 Apache. All rights reserved.