If not otherwise configured, the default configuration values are as follows:
System.getProperty("java.io.tmpdir")
.
Definition at line 90 of file DefaultFileItemFactory.java.
Public Member Functions | |
DefaultFileItemFactory () | |
Constructs an unconfigured instance of this class. | |
DefaultFileItemFactory (int sizeThreshold, File repository) | |
Constructs a preconfigured instance of this class. | |
File | getRepository () |
Returns the directory used to temporarily store files that are larger than the configured size threshold. | |
void | setRepository (File repository) |
Sets the directory used to temporarily store files that are larger than the configured size threshold. | |
int | getSizeThreshold () |
Returns the size threshold beyond which files are written directly to disk. | |
void | setSizeThreshold (int sizeThreshold) |
Sets the size threshold beyond which files are written directly to disk. | |
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. | |
Static Public Attributes | |
static final int | DEFAULT_SIZE_THRESHOLD = 10240 |
The default threshold above which uploads will be stored on disk. |
org.apache.commons.fileupload.DefaultFileItemFactory.DefaultFileItemFactory | ( | ) |
Constructs an unconfigured instance of this class.
The resulting factory may be configured by calling the appropriate setter methods.
Definition at line 124 of file DefaultFileItemFactory.java.
org.apache.commons.fileupload.DefaultFileItemFactory.DefaultFileItemFactory | ( | int | sizeThreshold, | |
File | repository | |||
) |
Constructs a preconfigured instance of this class.
sizeThreshold | The threshold, in bytes, below which items will be retained in memory and above which they will be stored as a file. | |
repository | The data repository, which is the directory in which files will be created, should the item size exceed the threshold. |
Definition at line 139 of file DefaultFileItemFactory.java.
File org.apache.commons.fileupload.DefaultFileItemFactory.getRepository | ( | ) |
Returns the directory used to temporarily store files that are larger than the configured size threshold.
Definition at line 158 of file DefaultFileItemFactory.java.
Referenced by org.apache.commons.fileupload.DiskFileUpload.getRepositoryPath().
void org.apache.commons.fileupload.DefaultFileItemFactory.setRepository | ( | File | repository | ) |
Sets the directory used to temporarily store files that are larger than the configured size threshold.
repository | The directory in which temporary files will be located. |
Definition at line 173 of file DefaultFileItemFactory.java.
Referenced by org.apache.commons.fileupload.DiskFileUpload.setRepositoryPath().
int org.apache.commons.fileupload.DefaultFileItemFactory.getSizeThreshold | ( | ) |
Returns the size threshold beyond which files are written directly to disk.
The default value is 1024 bytes.
Definition at line 187 of file DefaultFileItemFactory.java.
Referenced by org.apache.commons.fileupload.DiskFileUpload.getSizeThreshold().
void org.apache.commons.fileupload.DefaultFileItemFactory.setSizeThreshold | ( | int | sizeThreshold | ) |
Sets the size threshold beyond which files are written directly to disk.
sizeThreshold | The size threshold, in bytes. |
Definition at line 201 of file DefaultFileItemFactory.java.
Referenced by org.apache.commons.fileupload.DiskFileUpload.setSizeThreshold().
FileItem org.apache.commons.fileupload.DefaultFileItemFactory.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.
fieldName | The name of the form field. | |
contentType | The content type of the form field. | |
isFormField | true if this is a plain form field; false otherwise. | |
fileName | The name of the uploaded file, if any, as supplied by the browser or other client. |
Implements org.apache.commons.fileupload.FileItemFactory.
Definition at line 223 of file DefaultFileItemFactory.java.