Package org.apache.commons.fileupload
Class DefaultFileItem
- java.lang.Object
-
- org.apache.commons.fileupload.disk.DiskFileItem
-
- org.apache.commons.fileupload.DefaultFileItem
-
- All Implemented Interfaces:
java.io.Serializable,FileItem
public class DefaultFileItem extends DiskFileItem
Deprecated.UseDiskFileIteminstead.The default implementation of the
FileIteminterface.After retrieving an instance of this class from a
DiskFileUploadinstance (see#parseRequest(javax.servlet.http.HttpServletRequest)), you may either request all contents of file at once usingDiskFileItem.get()or request anInputStreamwithDiskFileItem.getInputStream()and process the file without attempting to load it into memory, which may come handy with large files.- Version:
- $Id: DefaultFileItem.java 155417 2005-02-26 13:00:27Z dirkv $
- Author:
- Rafal Krzewski, Sean Legassick, Jason van Zyl, John McNally, Martin Cooper, Sean C. Sullivan
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.commons.fileupload.disk.DiskFileItem
DEFAULT_CHARSET
-
-
Constructor Summary
Constructors Constructor Description DefaultFileItem(java.lang.String fieldName, java.lang.String contentType, boolean isFormField, java.lang.String fileName, int sizeThreshold, java.io.File repository)Deprecated.UseDiskFileIteminstead.
-
Method Summary
-
Methods inherited from class org.apache.commons.fileupload.disk.DiskFileItem
delete, finalize, get, getCharSet, getContentType, getFieldName, getInputStream, getName, getOutputStream, getSize, getStoreLocation, getString, getString, getTempFile, isFormField, isInMemory, setFieldName, setFormField, toString, write
-
-
-
-
Constructor Detail
-
DefaultFileItem
public DefaultFileItem(java.lang.String fieldName, java.lang.String contentType, boolean isFormField, java.lang.String fileName, int sizeThreshold, java.io.File repository)Deprecated.UseDiskFileIteminstead.Constructs a newDefaultFileIteminstance.- Parameters:
fieldName- The name of the form field.contentType- The content type passed by the browser ornullif not specified.isFormField- Whether or not this item is a plain form field, as opposed to a file upload.fileName- The original filename in the user's filesystem, ornullif not specified.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.
-
-