|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.stripes.controller.multipart.CommonsMultipartWrapper
public class CommonsMultipartWrapper
An implementation of MultipartWrapper that uses Jakarta Commons FileUpload (from apache) to parse the request parts. This implementation requires that both commons-fileupload and commons-io be present in the classpath. While this implementation does introduce additional dependencies, it's licensing (ASL 2.0) is significantly less restrictive than the licensing for COS - the other alternative provided by Stripes.
Constructor Summary | |
---|---|
CommonsMultipartWrapper()
|
Method Summary | |
---|---|
void |
build(HttpServletRequest request,
File tempDir,
long maxPostSize)
Pseudo-constructor that allows the class to perform any initialization necessary. |
Enumeration<String> |
getFileParameterNames()
Fetches the names of all file parameters in the request. |
FileBean |
getFileParameterValue(String name)
Responsible for constructing a FileBean object for the named file parameter. |
Enumeration<String> |
getParameterNames()
Fetches the names of all non-file parameters in the request. |
String[] |
getParameterValues(String name)
Fetches all values of a specific parameter in the request. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommonsMultipartWrapper()
Method Detail |
---|
public void build(HttpServletRequest request, File tempDir, long maxPostSize) throws IOException, FileUploadLimitExceededException
build
in interface MultipartWrapper
request
- an HttpServletRequest that has a content-type of multipart.tempDir
- a File representing the temporary directory that can be used to store
file parts as they are uploaded if this is desirablemaxPostSize
- the size in bytes beyond which the request should not be read, and a
FileUploadLimitExceeded exception should be thrown
IOException
- if a problem occurs processing the request of storing temporary
files
FileUploadLimitExceededException
- if the POST content is longer than the
maxPostSize supplied.public Enumeration<String> getParameterNames()
getParameterNames
in interface MultipartWrapper
public String[] getParameterValues(String name)
getParameterValues
in interface MultipartWrapper
name
- the name of the request parameter
public Enumeration<String> getFileParameterNames()
getFileParameterNames
in interface MultipartWrapper
public FileBean getFileParameterValue(String name)
getFileParameterValue
in interface MultipartWrapper
name
- the name of the file parameter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |