This class wraps the MultipartRequest class by Jason Pell for the Servlet environment.
3.0
Inheritance Path. java.lang.Object-> com.itmill.toolkit.terminal.web.MultipartRequest -> com.itmill.toolkit.terminal.web.ServletMultipartRequest
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.
Exceptions
IllegalArgumentException
If the request.getContentType() does not contain a Content-Type of "multipart/form-data" or the boundary is not found.
IOException
If the request.getContentLength() is higher than MAX_READ_BYTES or strSaveDirectory is invalid or cannot be written to.
MAX_READ_BYTES
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.
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.
Exceptions
IllegalArgumentException
If the request.getContentType() does not contain a Content-Type of "multipart/form-data" or the boundary is not found.
IOException
If the request.getContentLength() is higher than MAX_READ_BYTES or strSaveDirectory is invalid or cannot be written to.
MAX_READ_BYTES
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.
intMaxReadBytes
Overrides the MAX_BYTES_READ value, to allow arbitrarily long files.
Exceptions
IllegalArgumentException
If the request.getContentType() does not contain a Content-Type of "multipart/form-data" or the boundary is not found.
IOException
If the request.getContentLength() is higher than MAX_READ_BYTES or strSaveDirectory is invalid or cannot be written to.
MAX_READ_BYTES
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.