public final class InputStreamHandler extends Object implements ResponseHandler
InputStream
objects.
Simply pipes the contents of the InputStream
to RestResponse.getNegotiatedOutputStream()
.
Sets the ServletResponseWrapper.setContentType(String)
.
Constructor and Description |
---|
InputStreamHandler() |
Modifier and Type | Method and Description |
---|---|
boolean |
handle(RestRequest req,
RestResponse res)
Process this response if possible.
|
public InputStreamHandler()
public boolean handle(RestRequest req, RestResponse res) throws IOException, NotAcceptable, HttpException
ResponseHandler
handle
in interface ResponseHandler
req
- The HTTP servlet request.res
- The HTTP servlet response;IOException
- If low-level exception occurred on output stream.
Results in a HttpServletResponse.SC_INTERNAL_SERVER_ERROR
error.HttpException
- If some other exception occurred.
Can be used to provide an appropriate HTTP response code and message.NotAcceptable
Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.