Home » apache-tomcat-6.0.26-src » org.apache » tomcat » util » http » fileupload » [javadoc | source]
org.apache.tomcat.util.http.fileupload
public class: DiskFileUpload [javadoc | source]
java.lang.Object
   org.apache.tomcat.util.http.fileupload.FileUploadBase
      org.apache.tomcat.util.http.fileupload.DiskFileUpload

High level API for processing file uploads.

This class handles multiple files per single HTML widget, sent using multipart/mixed encoding type, as specified by RFC 1867. Use #parseRequest(HttpServletRequest) to acquire a list of org.apache.tomcat.util.http.fileupload.FileItem s associated with a given HTML widget.

Individual parts will be stored in temporary disk storage or in memory, depending on their size, and will be available as org.apache.tomcat.util.http.fileupload.FileItem s.

Fields inherited from org.apache.tomcat.util.http.fileupload.FileUploadBase:
CONTENT_TYPE,  CONTENT_DISPOSITION,  FORM_DATA,  ATTACHMENT,  MULTIPART,  MULTIPART_FORM_DATA,  MULTIPART_MIXED,  MAX_HEADER_SIZE
Constructor:
 public DiskFileUpload() 
 public DiskFileUpload(DefaultFileItemFactory fileItemFactory) 
    Constructs an instance of this class which uses the supplied factory to create FileItem instances.
Method from org.apache.tomcat.util.http.fileupload.DiskFileUpload Summary:
getFileItemFactory,   getRepositoryPath,   getSizeThreshold,   parseRequest,   setFileItemFactory,   setRepositoryPath,   setSizeThreshold
Methods from org.apache.tomcat.util.http.fileupload.FileUploadBase:
createItem,   getFieldName,   getFileItemFactory,   getFileName,   getHeader,   getHeaderEncoding,   getSizeMax,   isMultipartContent,   parseHeaders,   parseRequest,   setFileItemFactory,   setHeaderEncoding,   setSizeMax
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tomcat.util.http.fileupload.DiskFileUpload Detail:
 public FileItemFactory getFileItemFactory() 
    Returns the factory class used when creating file items.
 public String getRepositoryPath() 
    Returns the location used to temporarily store files that are larger than the configured size threshold.
 public int getSizeThreshold() 
    Returns the size threshold beyond which files are written directly to disk.
 public List parseRequest(HttpServletRequest req,
    int sizeThreshold,
    long sizeMax,
    String path) throws FileUploadException 
    Processes an RFC 1867 compliant multipart/form-data stream. If files are stored on disk, the path is given by getRepository().
 public  void setFileItemFactory(FileItemFactory factory) 
    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.
 public  void setRepositoryPath(String repositoryPath) 
    Sets the location used to temporarily store files that are larger than the configured size threshold.
 public  void setSizeThreshold(int sizeThreshold) 
    Sets the size threshold beyond which files are written directly to disk.