| java.lang.Object org.apache.commons.fileupload.disk.DiskFileItemFactory org.apache.commons.fileupload.DefaultFileItemFactory
DefaultFileItemFactory | public class DefaultFileItemFactory extends DiskFileItemFactory (Code) | | The default
org.apache.commons.fileupload.FileItemFactory implementation. This implementation creates
org.apache.commons.fileupload.FileItem instances which keep their
content either in memory, for smaller items, or in a temporary file on disk,
for larger items. The size threshold, above which content will be stored on
disk, is configurable, as is the directory in which temporary files will be
created.
If not otherwise configured, the default configuration values are as
follows:
- Size threshold is 10KB.
- Repository is the system default temp directory, as returned by
System.getProperty("java.io.tmpdir") .
author: Martin Cooper version: $Id: DefaultFileItemFactory.java 479262 2006-11-26 03:09:24Z niallp $ |
Method Summary | |
public FileItem | createItem(String fieldName, String contentType, boolean isFormField, String fileName) Create a new
org.apache.commons.fileupload.DefaultFileItem instance from the supplied parameters and the local factory
configuration.
Parameters: fieldName - The name of the form field. Parameters: contentType - The content type of the form field. Parameters: isFormField - true if this is a plain form field;false otherwise. Parameters: fileName - The name of the uploaded file, if any, as suppliedby the browser or other client. |
DefaultFileItemFactory | public DefaultFileItemFactory()(Code) | | Constructs an unconfigured instance of this class. The resulting factory
may be configured by calling the appropriate setter methods.
|
DefaultFileItemFactory | public DefaultFileItemFactory(int sizeThreshold, File repository)(Code) | | Constructs a preconfigured instance of this class.
Parameters: sizeThreshold - The threshold, in bytes, below which items will beretained in memory and above which they will bestored as a file. Parameters: repository - The data repository, which is the directory inwhich files will be created, should the item sizeexceed the threshold. |
createItem | public FileItem createItem(String fieldName, String contentType, boolean isFormField, String fileName)(Code) | | Create a new
org.apache.commons.fileupload.DefaultFileItem instance from the supplied parameters and the local factory
configuration.
Parameters: fieldName - The name of the form field. Parameters: contentType - The content type of the form field. Parameters: isFormField - true if this is a plain form field;false otherwise. Parameters: fileName - The name of the uploaded file, if any, as suppliedby the browser or other client. The newly created file item. |
Fields inherited from org.apache.commons.fileupload.disk.DiskFileItemFactory | final public static int DEFAULT_SIZE_THRESHOLD(Code)(Java Doc)
|
|
|