public class StandardMultipartRequest extends RequestWrapper implements MultipartRequest
SESSION_NAMEANDROID_CONTEXT, HTTP_MESSAGE_CONVERTER, REQUEST_CREATED_SESSION, RESPONSE_PRODUCE_TYPEACCEPT, ACCEPT_CHARSET, ACCEPT_ENCODING, ACCEPT_LANGUAGE, ACCEPT_RANGES, Access_Control_Allow_Credentials, Access_Control_Allow_Headers, Access_Control_Allow_Methods, Access_Control_Allow_Origin, Access_Control_Expose_Headers, Access_Control_Max_Age, Access_Control_Request_Headers, Access_Control_Request_Method, AGE, ALLOW, AUTHORIZATION, CACHE_CONTROL, CONNECTION, CONTENT_ENCODING, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_LOCATION, CONTENT_MD5, CONTENT_RANGE, CONTENT_TYPE, COOKIE, DATE, DAV, DEPTH, DESTINATION, ETAG, EXPECT, EXPIRES, FROM, HOST, IF, IF_MATCH, IF_MODIFIED_SINCE, IF_NONE_MATCH, IF_RANGE, IF_UNMODIFIED_SINCE, LAST_MODIFIED, LOCATION, LOCK_TOKEN, MAX_FORWARDS, ORIGIN, OVERWRITE, PRAGMA, PROXY_AUTHENTICATE, PROXY_AUTHORIZATION, RANGE, REFERER, RETRY_AFTER, SERVER, SET_COOKIE, STATUS_URI, TE, TIMEOUT, TRAILER, TRANSFER_ENCODING, UPGRADE, USER_AGENT, VARY, VIA, WARNING, WWW_AUTHENTICATE| Constructor and Description |
|---|
StandardMultipartRequest(HttpRequest request,
MultiValueMap<java.lang.String,MultipartFile> mpFiles,
MultiValueMap<java.lang.String,java.lang.String> mpParams,
java.util.Map<java.lang.String,java.lang.String> mpContentTypes) |
| Modifier and Type | Method and Description |
|---|---|
MultipartFile |
getFile(java.lang.String name)
Return the contents plus description of an uploaded file in this request, or null if it does not exist.
|
java.util.Map<java.lang.String,MultipartFile> |
getFileMap()
Return a
Map of the multipart files contained in this request. |
java.util.Iterator<java.lang.String> |
getFileNames()
Return an
Iterator of String objects containing the parameter names of the multipart files
contained in this request. |
java.util.List<MultipartFile> |
getFiles(java.lang.String name)
Return the contents plus description of uploaded files in this request, or an empty list if it does not exist.
|
MultiValueMap<java.lang.String,MultipartFile> |
getMultiFileMap()
Return a
MultiValueMap of the multipart files contained in this request. |
java.lang.String |
getMultipartContentType(java.lang.String paramOrFileName)
Determine the content type of the specified request part.
|
MultiValueMap<java.lang.String,java.lang.String> |
getParameter()
Returns
MultiValueMap of the parameters of this request, or empty MultiValueMap if there are no
parameters. |
java.lang.String |
getParameter(java.lang.String name)
Returns the value of a request parameter as a
String, or null if the parameter does not exist. |
java.util.List<java.lang.String> |
getParameterNames()
Returns an
List of String containing the names of the parameters contained in this request. |
java.util.List<java.lang.String> |
getParameters(java.lang.String name)
Returns an array of
String objects containing all of the values the given request parameter has, or
null if the parameter does not exist. |
changeSessionId, getAccept, getAcceptLanguage, getAcceptLanguages, getAccepts, getAttribute, getBody, getContentLength, getContentType, getContext, getCookie, getCookies, getCookieValue, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getLocalAddr, getLocalName, getLocalPort, getMethod, getPath, getQueries, getQuery, getQuery, getQueryNames, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getSession, getURI, getValidSession, isSessionValid, removeAttribute, setAttributeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitchangeSessionId, getAccept, getAcceptLanguage, getAcceptLanguages, getAccepts, getBody, getContentLength, getContentType, getContext, getCookie, getCookies, getCookieValue, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getLocalAddr, getLocalName, getLocalPort, getMethod, getPath, getQueries, getQuery, getQuery, getQueryNames, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getSession, getURI, getValidSession, isSessionValidgetAttribute, removeAttribute, setAttributepublic StandardMultipartRequest(HttpRequest request, MultiValueMap<java.lang.String,MultipartFile> mpFiles, MultiValueMap<java.lang.String,java.lang.String> mpParams, java.util.Map<java.lang.String,java.lang.String> mpContentTypes)
public java.util.Iterator<java.lang.String> getFileNames()
MultipartRequest Return an Iterator of String objects containing the parameter names of the multipart files
contained in this request. These are the field names of the form (like with normal parameters), not the original
file names.
getFileNames in interface MultipartRequestpublic MultipartFile getFile(java.lang.String name)
MultipartRequestgetFile in interface MultipartRequestname - parameter name.MultipartFile object.public java.util.List<MultipartFile> getFiles(java.lang.String name)
MultipartRequestgetFiles in interface MultipartRequestname - parameter name.MultipartFile list.public java.util.Map<java.lang.String,MultipartFile> getFileMap()
MultipartRequestMap of the multipart files contained in this request.getFileMap in interface MultipartRequestMultipartFile objects as values.public MultiValueMap<java.lang.String,MultipartFile> getMultiFileMap()
MultipartRequestMultiValueMap of the multipart files contained in this request.getMultiFileMap in interface MultipartRequestMultipartFile objects as values.public java.lang.String getMultipartContentType(java.lang.String paramOrFileName)
MultipartRequestgetMultipartContentType in interface MultipartRequestparamOrFileName - the name of the part.public java.util.List<java.lang.String> getParameterNames()
HttpRequestList of String containing the names of the parameters contained in this request. If
the request has no parameters, the method returns an empty List.getParameterNames in interface HttpRequestgetParameterNames in class RequestWrapperList of String objects.public java.lang.String getParameter(java.lang.String name)
HttpRequestString, or null if the parameter does not exist.
You should only use this method when you are sure the parameter has only one value. If the parameter might
have more than one value, use HttpRequest.getParameters(String).
getParameter in interface HttpRequestgetParameter in class RequestWrappername - a String specifying the name of the parameter.HttpRequest.getParameters(String)public java.util.List<java.lang.String> getParameters(java.lang.String name)
HttpRequestString objects containing all of the values the given request parameter has, or
null if the parameter does not exist.getParameters in interface HttpRequestgetParameters in class RequestWrappername - a String containing the name of the parameter whose value is requested.String objects containing the parameter's values.HttpRequest.getParameter(String)public MultiValueMap<java.lang.String,java.lang.String> getParameter()
HttpRequestMultiValueMap of the parameters of this request, or empty MultiValueMap if there are no
parameters.getParameter in interface HttpRequestgetParameter in class RequestWrapperMultiValueMap containing parameter names as keys and parameter values as map values.