| |
|
| javax.servlet.http.HttpServletRequestWrapper dinamica.upload.MultipartRequestWrapper
MultipartRequestWrapper | public class MultipartRequestWrapper extends HttpServletRequestWrapper (Code) | | This class is used to encapsulate the decoding of HTTP POST requests
using the "multipart/form-data" encoding type.
It uses Javamail for Mime libraries and the JavaBeans Activation
Framework (JAF), so make sure you have activation.jar and mail.jar
in the class path before using this class.
Note: The servlet input stream is empty after the contructor executes.
This prevents the use of this class on the same request twice.
author: Rick Knowles version: $Id: MultipartRequestWrapper.java,v 1.3 2005/09/08 02:42:02 rickknowles Exp $ |
Constructor Summary | |
public | MultipartRequestWrapper(ServletRequest request) Constructor - this uses a servlet request, validating it to make
sure it's a multipart/form-data request, then reads the
ServletInputStream, storing the results after Mime decoding in
a member array. |
MultipartRequestWrapper | public MultipartRequestWrapper(ServletRequest request) throws IOException(Code) | | Constructor - this uses a servlet request, validating it to make
sure it's a multipart/form-data request, then reads the
ServletInputStream, storing the results after Mime decoding in
a member array. Use getParameter etc to retrieve the contents.
Parameters: request - The Servlet's request object. |
getContentType | public String getContentType(String name)(Code) | | Get the MimeType of a particular parameter.
Parameters: name - The parameter you wish to find the Mime type of. The Mime type for the requested parameter (as specifiedin the Mime header during the post). |
getContentTypeMap | public Map getContentTypeMap()(Code) | | Retrieve a Map of the filenames supplied in the HTTP POST request.
|
getParameterMap | public Map getParameterMap()(Code) | | |
getRawParameter | public byte[] getRawParameter(String name) throws IOException(Code) | | The byte array version of the parameter requested (as an Object).
This always returns a byte array, ignoring the mime type of the
submitted object.
Parameters: name - The parameter you wish to retrieve. A byte array representation of the supplied parameter. |
getRawParameterMap | public Map getRawParameterMap() throws IOException(Code) | | Retrieve a Map of the raw bytes of the parameters supplied in the HTTP POST request.
|
getUploadFileName | public String getUploadFileName(String name)(Code) | | The local (client) name of the file submitted if this parameter was
a file.
Parameters: name - The parameter you wish to find the file name for. The local name for the requested parameter (as specifiedin the Mime header during the post). |
getUploadFileNameMap | public Map getUploadFileNameMap()(Code) | | Retrieve a Map of the filenames supplied in the HTTP POST request.
|
isFileUploadParameter | public boolean isFileUploadParameter(String name)(Code) | | |
isNonFileUploadParameter | public boolean isNonFileUploadParameter(String name)(Code) | | |
|
|
|