org.millstone.webadapter
Class ServletMultipartRequest
java.lang.Object
|
+--org.millstone.webadapter.MultipartRequest
|
+--org.millstone.webadapter.ServletMultipartRequest
- public class ServletMultipartRequest
- extends MultipartRequest
This class wraps the MultipartRequest class by Jason Pell
for the Servlet environment.
- Since:
- 3.0
- Version:
- 3.0.3
- Author:
- IT Mill Ltd
Constructor Summary |
ServletMultipartRequest(javax.servlet.http.HttpServletRequest request,
int intMaxReadBytes)
Constructor wrapper for loading the request into memory rather than temp-file. |
ServletMultipartRequest(javax.servlet.http.HttpServletRequest request,
java.lang.String strSaveDirectory)
Constructor wrapper, unwraps the InputStream,
content type and content lenght from the servlet request object. |
ServletMultipartRequest(javax.servlet.http.HttpServletRequest request,
java.lang.String strSaveDirectory,
int intMaxReadBytes)
Constructor wrapper, unwraps the InputStream,
content type and content lenght from the servlet request object.
|
Methods inherited from class org.millstone.webadapter.MultipartRequest |
debug, getContentType, getEncoding, getFile, getFileContents, getFileParameter, getFileParameterNames, getFileSize, getFileSystemName, getHtmlTable, getParameterNames, getURLParameter, getURLParameters, setEncoding |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServletMultipartRequest
public ServletMultipartRequest(javax.servlet.http.HttpServletRequest request,
java.lang.String strSaveDirectory)
throws java.lang.IllegalArgumentException,
java.io.IOException
- Constructor wrapper, unwraps the InputStream,
content type and content lenght from the servlet request object.
- Parameters:
request
- The HttpServletRequest will be used to initialise the MultipartRequest super class.strSaveDirectory
- The temporary directory to save the file from where they can then be moved to wherever by the
calling process. If you specify null for this parameter, then any files uploaded
will be silently ignored.
- Throws:
java.lang.IllegalArgumentException
- If the request.getContentType() does not contain a Content-Type of "multipart/form-data" or the boundary is not found.
java.io.IOException
- If the request.getContentLength() is higher than MAX_READ_BYTES or strSaveDirectory is invalid or cannot be written to.- See Also:
MultipartRequest.MAX_READ_BYTES
ServletMultipartRequest
public ServletMultipartRequest(javax.servlet.http.HttpServletRequest request,
java.lang.String strSaveDirectory,
int intMaxReadBytes)
throws java.lang.IllegalArgumentException,
java.io.IOException
- Constructor wrapper, unwraps the InputStream,
content type and content lenght from the servlet request object.
Also allow to explicitly set the max permissable lenght of the request.
- Parameters:
request
- The HttpServletRequest will be used to initialise the MultipartRequest super class.strSaveDirectory
- The temporary directory to save the file from where they can then be moved to wherever by the
calling process. If you specify null for this parameter, then any files uploaded
will be silently ignored.intMaxReadBytes
- Overrides the MAX_BYTES_READ value, to allow arbitrarily long files.
- Throws:
java.lang.IllegalArgumentException
- If the request.getContentType() does not contain a Content-Type of "multipart/form-data" or the boundary is not found.
java.io.IOException
- If the request.getContentLength() is higher than MAX_READ_BYTES or strSaveDirectory is invalid or cannot be written to.- See Also:
MultipartRequest.MAX_READ_BYTES
ServletMultipartRequest
public ServletMultipartRequest(javax.servlet.http.HttpServletRequest request,
int intMaxReadBytes)
throws java.lang.IllegalArgumentException,
java.io.IOException
- Constructor wrapper for loading the request into memory rather than temp-file.
- Parameters:
request
- The HttpServletRequest will be used to initialise the MultipartRequest super class.intMaxReadBytes
- Overrides the MAX_BYTES_READ value, to allow arbitrarily long files.
- Throws:
java.lang.IllegalArgumentException
- If the request.getContentType() does not contain a Content-Type of "multipart/form-data" or the boundary is not found.
java.io.IOException
- If the request.getContentLength() is higher than MAX_READ_BYTES or strSaveDirectory is invalid or cannot be written to.- See Also:
MultipartRequest.MAX_READ_BYTES
Copyright © 2000,2001,2002 IT Mill Ltd. All Rights
Reserved.