| java.lang.Object org.apache.commons.fileupload.FileUploadBase org.apache.commons.fileupload.DiskFileUpload
Constructor Summary | |
public | DiskFileUpload() Constructs an instance of this class which uses the default factory to
create FileItem instances. | public | DiskFileUpload(DefaultFileItemFactory fileItemFactory) Constructs an instance of this class which uses the supplied factory to
create FileItem instances. |
getFileItemFactory | public FileItemFactory getFileItemFactory()(Code) | | Returns the factory class used when creating file items.
The factory class for new file items. |
parseRequest | public List parseRequest(HttpServletRequest req, int sizeThreshold, long sizeMax, String path) throws FileUploadException(Code) | | Processes an RFC 1867
compliant multipart/form-data stream. If files are stored
on disk, the path is given by getRepository() .
Parameters: req - The servlet request to be parsed. Must be non-null. Parameters: sizeThreshold - The max size in bytes to be stored in memory. Parameters: sizeMax - The maximum allowed upload size, in bytes. Parameters: path - The location where the files should be stored. A list of FileItem instances parsed from therequest, in the order that they were transmitted. throws: FileUploadException - if there are problems reading/parsingthe request or storing files. |
setFileItemFactory | public void setFileItemFactory(FileItemFactory factory)(Code) | | Sets the factory class to use when creating file items. The factory must
be an instance of DefaultFileItemFactory or a subclass
thereof, or else a ClassCastException will be thrown.
Parameters: factory - The factory class for new file items. |
setRepositoryPath | public void setRepositoryPath(String repositoryPath)(Code) | | Sets the location used to temporarily store files that are larger
than the configured size threshold.
Parameters: repositoryPath - The path to the temporary file location. See Also: DiskFileUpload.getRepositoryPath() |
setSizeThreshold | public void setSizeThreshold(int sizeThreshold)(Code) | | Sets the size threshold beyond which files are written directly to disk.
Parameters: sizeThreshold - The size threshold, in bytes. See Also: DiskFileUpload.getSizeThreshold() |
|
|