public class StandardMultipartHttpServletRequest extends AbstractMultipartHttpServletRequest
Modifier and Type | Class and Description |
---|---|
private static class |
StandardMultipartHttpServletRequest.StandardMultipartFile
Spring MultipartFile adapter, wrapping a Servlet 3.0 Part object.
|
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
CONTENT_DISPOSITION |
private static java.lang.String |
FILENAME_KEY |
private static java.lang.String |
FILENAME_WITH_CHARSET_KEY |
private java.util.Set<java.lang.String> |
multipartParameterNames |
private static java.nio.charset.Charset |
US_ASCII |
Constructor and Description |
---|
StandardMultipartHttpServletRequest(HttpServletRequest request)
Create a new StandardMultipartHttpServletRequest wrapper for the given request,
immediately parsing the multipart content.
|
StandardMultipartHttpServletRequest(HttpServletRequest request,
boolean lazyParsing)
Create a new StandardMultipartHttpServletRequest wrapper for the given request.
|
Modifier and Type | Method and Description |
---|---|
private java.lang.String |
extractFilename(java.lang.String contentDisposition) |
private java.lang.String |
extractFilename(java.lang.String contentDisposition,
java.lang.String key) |
private java.lang.String |
extractFilenameWithCharset(java.lang.String contentDisposition) |
java.lang.String |
getMultipartContentType(java.lang.String paramOrFileName)
Determine the content type of the specified request part.
|
HttpHeaders |
getMultipartHeaders(java.lang.String paramOrFileName)
Return the headers associated with the specified part of the multipart request.
|
java.util.Map<java.lang.String,java.lang.String[]> |
getParameterMap() |
java.util.Enumeration<java.lang.String> |
getParameterNames() |
protected void |
initializeMultipart()
Lazily initialize the multipart request, if possible.
|
private void |
parseRequest(HttpServletRequest request) |
getFile, getFileMap, getFileNames, getFiles, getMultiFileMap, getMultipartFiles, getRequest, getRequestHeaders, getRequestMethod, setMultipartFiles
private static final java.lang.String CONTENT_DISPOSITION
private static final java.lang.String FILENAME_KEY
private static final java.lang.String FILENAME_WITH_CHARSET_KEY
private static final java.nio.charset.Charset US_ASCII
private java.util.Set<java.lang.String> multipartParameterNames
public StandardMultipartHttpServletRequest(HttpServletRequest request) throws MultipartException
request
- the servlet request to wrapMultipartException
- if parsing failedpublic StandardMultipartHttpServletRequest(HttpServletRequest request, boolean lazyParsing) throws MultipartException
request
- the servlet request to wraplazyParsing
- whether multipart parsing should be triggered lazily on
first access of multipart files or parametersMultipartException
- if an immediate parsing attempt failedprivate void parseRequest(HttpServletRequest request)
private java.lang.String extractFilename(java.lang.String contentDisposition)
private java.lang.String extractFilename(java.lang.String contentDisposition, java.lang.String key)
private java.lang.String extractFilenameWithCharset(java.lang.String contentDisposition)
protected void initializeMultipart()
AbstractMultipartHttpServletRequest
initializeMultipart
in class AbstractMultipartHttpServletRequest
public java.util.Enumeration<java.lang.String> getParameterNames()
public java.util.Map<java.lang.String,java.lang.String[]> getParameterMap()
public java.lang.String getMultipartContentType(java.lang.String paramOrFileName)
MultipartRequest
paramOrFileName
- the name of the partnull
if not definedpublic HttpHeaders getMultipartHeaders(java.lang.String paramOrFileName)
MultipartHttpServletRequest
If the underlying implementation supports access to headers, then all headers are returned. Otherwise, the returned headers will include a 'Content-Type' header at the very least.