Class RequestPartServletServerHttpRequest
java.lang.Object
org.springframework.http.server.ServletServerHttpRequest
org.springframework.web.multipart.support.RequestPartServletServerHttpRequest
- All Implemented Interfaces:
- HttpInputMessage,- HttpMessage,- HttpRequest,- ServerHttpRequest
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 multipart processing
 the part is accessed through ServletRequest.getPart.- Since:
- 3.1
- Author:
- Rossen Stoyanchev, Juergen Hoeller
- 
Field SummaryFields inherited from class org.springframework.http.server.ServletServerHttpRequestFORM_CHARSET
- 
Constructor SummaryConstructorsConstructorDescriptionRequestPartServletServerHttpRequest(HttpServletRequest request, String requestPartName) Create a newRequestPartServletServerHttpRequestinstance.
- 
Method SummaryModifier and TypeMethodDescriptiongetBody()Return the body of the message as an input stream.Return the headers of this message.Methods inherited from class org.springframework.http.server.ServletServerHttpRequestgetAsyncRequestControl, getLocalAddress, getMethod, getPrincipal, getRemoteAddress, getServletRequest, getURIMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.http.HttpRequestgetMethodValue
- 
Constructor Details- 
RequestPartServletServerHttpRequestpublic RequestPartServletServerHttpRequest(HttpServletRequest request, String requestPartName) throws MissingServletRequestPartException Create a newRequestPartServletServerHttpRequestinstance.- Parameters:
- request- the current servlet request
- requestPartName- the name of the part to adapt to the- ServerHttpRequestcontract
- Throws:
- MissingServletRequestPartException- if the request part cannot be found
- MultipartException- if MultipartHttpServletRequest cannot be initialized
 
 
- 
- 
Method Details- 
getHeadersDescription copied from interface:HttpMessageReturn the headers of this message.- Specified by:
- getHeadersin interface- HttpMessage
- Overrides:
- getHeadersin class- ServletServerHttpRequest
- Returns:
- a corresponding HttpHeaders object (never null)
 
- 
getBodyDescription copied from interface:HttpInputMessageReturn the body of the message as an input stream.- Specified by:
- getBodyin interface- HttpInputMessage
- Overrides:
- getBodyin class- ServletServerHttpRequest
- Returns:
- the input stream body (never null)
- Throws:
- IOException- in case of I/O errors
 
 
-