类 RequestPartServletServerHttpRequest
- java.lang.Object
- org.springframework.http.server.ServletServerHttpRequest
- org.springframework.web.multipart.support.RequestPartServletServerHttpRequest
- 所有已实现的接口:
HttpInputMessage,HttpMessage,HttpRequest,ServerHttpRequest
public class RequestPartServletServerHttpRequest extends ServletServerHttpRequest
ServerHttpRequestimplementation that accesses one part of a multipart request. If usingMultipartResolverconfiguration the part is accessed through aMultipartFile. Or if using Servlet 3.0 multipart processing the part is accessed throughServletRequest.getPart.- 从以下版本开始:
- 3.1
- 作者:
- Rossen Stoyanchev, Juergen Hoeller
字段概要
从类继承的字段 org.springframework.http.server.ServletServerHttpRequest
FORM_CHARSET, FORM_CONTENT_TYPE
构造器概要
构造器 构造器 说明 RequestPartServletServerHttpRequest(HttpServletRequest request, String requestPartName)Create a newRequestPartServletServerHttpRequestinstance.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 InputStreamgetBody()Return the body of the message as an input stream.HttpHeadersgetHeaders()Return the headers of this message.从类继承的方法 org.springframework.http.server.ServletServerHttpRequest
getAsyncRequestControl, getLocalAddress, getMethod, getMethodValue, getPrincipal, getRemoteAddress, getServletRequest, getURI
构造器详细资料
RequestPartServletServerHttpRequest
public RequestPartServletServerHttpRequest(HttpServletRequest request, String requestPartName) throws MissingServletRequestPartException
Create a newRequestPartServletServerHttpRequestinstance.- 参数:
request- the current servlet requestrequestPartName- the name of the part to adapt to theServerHttpRequestcontract- 抛出:
MissingServletRequestPartException- if the request part cannot be foundMultipartException- if MultipartHttpServletRequest cannot be initialized
方法详细资料
getHeaders
public HttpHeaders getHeaders()
从接口复制的说明:HttpMessageReturn the headers of this message.- 指定者:
getHeaders在接口中HttpMessage- 覆盖:
getHeaders在类中ServletServerHttpRequest- 返回:
- a corresponding HttpHeaders object (never
null)
getBody
public InputStream getBody() throws IOException
从接口复制的说明:HttpInputMessageReturn the body of the message as an input stream.- 指定者:
getBody在接口中HttpInputMessage- 覆盖:
getBody在类中ServletServerHttpRequest- 返回:
- the input stream body (never
null) - 抛出:
IOException- in case of I/O errors