站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.1.0 API 文档英文版

MultipartHttpServletRequest (Spring Framework API 2.1) - Spring Framework 2.1.0 API 文档英文版


The Spring Framework

org.springframework.web.multipart
Interface MultipartHttpServletRequest

All Superinterfaces:
HttpServletRequest, ServletRequest
All Known Implementing Classes:
AbstractMultipartHttpServletRequest, DefaultMultipartHttpServletRequest, MockMultipartHttpServletRequest

public interface MultipartHttpServletRequest
extends HttpServletRequest

Provides additional methods for dealing with multipart content within a servlet request, allowing to access uploaded files. Implementations also need to override the standard ServletRequest methods for parameter access, making multipart parameters available.

A concrete implementation is DefaultMultipartHttpServletRequest. As an intermediate step, AbstractMultipartHttpServletRequest can be subclassed.

Since:
29.09.2003
Author:
Juergen Hoeller, Trevor D. Cook
See Also:
MultipartResolver, MultipartFile, ServletRequest.getParameter(java.lang.String), ServletRequest.getParameterNames(), ServletRequest.getParameterMap(), DefaultMultipartHttpServletRequest, AbstractMultipartHttpServletRequest

Field Summary
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Method Summary
 MultipartFile getFile(String name)
          Return the contents plus description of an uploaded file in this request, or null if it does not exist.
 Map getFileMap()
          Return a Map of the multipart files contained in this request.
 Iterator getFileNames()
          Return an Iterator of String objects containing the parameter names of the multipart files contained in this request.
 
Methods inherited from interface javax.servlet.http.HttpServletRequest
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole
 
Methods inherited from interface javax.servlet.ServletRequest
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding
 

Method Detail

getFileNames

Iterator getFileNames()
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.

Returns:
the names of the files

getFile

MultipartFile getFile(String name)
Return the contents plus description of an uploaded file in this request, or null if it does not exist.

Parameters:
name - a String specifying the parameter name of the multipart file
Returns:
the uploaded content in the form of a MultipartFile object

getFileMap

Map getFileMap()
Return a Map of the multipart files contained in this request.

Returns:
a map containing the parameter names as keys, and the MultipartFile objects as values
See Also:
MultipartFile

The Spring Framework

Copyright © 2002-2007 The Spring Framework.