public class RequestPartServletServerHttpRequest extends ServletServerHttpRequest
ServerHttpRequest
implementation that accesses one part of a multipart
request. If using MultipartResolver
configuration the part is accessed
through a MultipartFile
. Or if using Servlet 3.0 multipart processing
the part is accessed through ServletRequest.getPart
.FORM_CHARSET, FORM_CONTENT_TYPE
Constructor and Description |
---|
RequestPartServletServerHttpRequest(HttpServletRequest request,
java.lang.String partName)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
getBody()
Return the body of the message as an input stream.
|
HttpHeaders |
getHeaders()
Return the headers of this message.
|
getAsyncRequestControl, getLocalAddress, getMethod, getPrincipal, getRemoteAddress, getServletRequest, getURI
public RequestPartServletServerHttpRequest(HttpServletRequest request, java.lang.String partName) throws MissingServletRequestPartException
request
- the current requestpartName
- the name of the part to adapt to the ServerHttpRequest
contractMissingServletRequestPartException
- if the request part cannot be foundjava.lang.IllegalArgumentException
- if MultipartHttpServletRequest cannot be initializedpublic HttpHeaders getHeaders()
HttpMessage
getHeaders
in interface HttpMessage
getHeaders
in class ServletServerHttpRequest
public java.io.InputStream getBody() throws java.io.IOException
HttpInputMessage
getBody
in interface HttpInputMessage
getBody
in class ServletServerHttpRequest
java.io.IOException
- in case of I/O Errors