FileDocCategorySizeDatePackage
FileUpload.javaAPI DocApache Tomcat 6.0.143476Fri Jul 20 04:20:32 BST 2007org.apache.tomcat.util.http.fileupload

FileUpload

public class FileUpload extends FileUploadBase

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 {@link #parseRequest(HttpServletRequest)} to acquire a list of {@link org.apache.tomcat.util.http.fileupload.FileItem}s associated with a given HTML widget.

How the data for individual parts is stored is determined by the factory used to create them; a given part may be in memory, on disk, or somewhere else.

author
Rafal Krzewski
author
Daniel Rall
author
Jason van Zyl
author
John McNally
author
Martin Cooper
author
Sean C. Sullivan
version
$Id: FileUpload.java 467222 2006-10-24 03:17:11Z markt $

Fields Summary
private FileItemFactory
fileItemFactory
The factory to use to create new form items.
Constructors Summary
public FileUpload()
Constructs an instance of this class which uses the default factory to create FileItem instances.

see
#FileUpload(FileItemFactory)

        super();
    
public FileUpload(FileItemFactory fileItemFactory)
Constructs an instance of this class which uses the supplied factory to create FileItem instances.

see
#FileUpload()

        super();
        this.fileItemFactory = fileItemFactory;
    
Methods Summary
public FileItemFactorygetFileItemFactory()
Returns the factory class used when creating file items.

return
The factory class for new file items.

        return fileItemFactory;
    
public voidsetFileItemFactory(FileItemFactory factory)
Sets the factory class to use when creating file items.

param
factory The factory class for new file items.

        this.fileItemFactory = factory;