org.hdiv.config.multipart
Class StrutsMultipartConfig
java.lang.Object
org.hdiv.config.multipart.AbstractMultipartConfig
org.hdiv.config.multipart.StrutsMultipartConfig
- All Implemented Interfaces:
- IMultipartConfig
public class StrutsMultipartConfig
- extends AbstractMultipartConfig
Class containing multipart request configuration and methods initialized from
Spring Factory.
- Author:
- Gorka Vicente
|
Field Summary |
protected java.lang.String |
memFileSize
The size threshold which determines whether an uploaded file will be written
to disk or cached in memory. |
|
Method Summary |
void |
addTextParameter(RequestWrapper request,
org.apache.commons.fileupload.FileItem item)
Adds a regular text parameter to the set of text parameters for this request. |
protected long |
getSizeThreshold()
Returns the size threshold which determines whether an uploaded file will be
written to disk or cached in memory. |
void |
handleMultipartRequest(RequestWrapper request,
javax.servlet.ServletContext servletContext)
Parses the input stream and partitions the parsed items into a set of form
fields and a set of file items. |
void |
setMemFileSize(java.lang.String memFileSize)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
memFileSize
protected java.lang.String memFileSize
- The size threshold which determines whether an uploaded file will be written
to disk or cached in memory.
StrutsMultipartConfig
public StrutsMultipartConfig()
handleMultipartRequest
public void handleMultipartRequest(RequestWrapper request,
javax.servlet.ServletContext servletContext)
throws org.apache.commons.fileupload.FileUploadException,
org.apache.commons.fileupload.FileUploadBase.SizeLimitExceededException,
org.springframework.web.multipart.MaxUploadSizeExceededException
- Parses the input stream and partitions the parsed items into a set of form
fields and a set of file items.
- Parameters:
request - The multipart request wrapper.servletContext - servlet context
- Throws:
org.apache.commons.fileupload.FileUploadException - if an unrecoverable error occurs.
DiskFileUpload.SizeLimitExceededException - if size limit exceeded
org.apache.commons.fileupload.FileUploadBase.SizeLimitExceededException
org.springframework.web.multipart.MaxUploadSizeExceededException
getSizeThreshold
protected long getSizeThreshold()
- Returns the size threshold which determines whether an uploaded file will be
written to disk or cached in memory.
- Returns:
- The size threshold, in bytes.
addTextParameter
public void addTextParameter(RequestWrapper request,
org.apache.commons.fileupload.FileItem item)
- Adds a regular text parameter to the set of text parameters for this request.
Handles the case of multiple values for the same parameter by using an array
for the parameter value.
- Parameters:
request - The request in which the parameter was specified.item - The file item for the parameter to add.
setMemFileSize
public void setMemFileSize(java.lang.String memFileSize)
- Parameters:
memFileSize - The memFileSize to set.
Copyright © 2008 hdiv.org. All Rights Reserved.