ServletFileUpload
together with
DiskFileItemFactory
instead.@Deprecated public class DiskFileUpload 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 FileUploadBase.parseRequest(HttpServletRequest)
to acquire a list of 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 FileItem
s.
FileUploadBase.FileSizeLimitExceededException, FileUploadBase.FileUploadIOException, FileUploadBase.InvalidContentTypeException, FileUploadBase.IOFileUploadException, FileUploadBase.SizeLimitExceededException, FileUploadBase.UnknownSizeException
ATTACHMENT, CONTENT_DISPOSITION, CONTENT_LENGTH, CONTENT_TYPE, FORM_DATA, MAX_HEADER_SIZE, MULTIPART, MULTIPART_FORM_DATA, MULTIPART_MIXED
Constructor and Description |
---|
DiskFileUpload()
Deprecated.
1.1 Use
FileUpload instead. |
DiskFileUpload(DefaultFileItemFactory fileItemFactory)
Deprecated.
1.1 Use
FileUpload instead. |
Modifier and Type | Method and Description |
---|---|
FileItemFactory |
getFileItemFactory()
Deprecated.
1.1 Use
FileUpload instead. |
java.lang.String |
getRepositoryPath()
Deprecated.
1.1 Use
DiskFileItemFactory instead. |
int |
getSizeThreshold()
Deprecated.
1.1 Use
DiskFileItemFactory instead. |
java.util.List<FileItem> |
parseRequest(HttpServletRequest req,
int sizeThreshold,
long sizeMax,
java.lang.String path)
Deprecated.
1.1 Use
ServletFileUpload instead. |
void |
setFileItemFactory(FileItemFactory factory)
Deprecated.
1.1 Use
FileUpload instead. |
void |
setRepositoryPath(java.lang.String repositoryPath)
Deprecated.
1.1 Use
DiskFileItemFactory instead. |
void |
setSizeThreshold(int sizeThreshold)
Deprecated.
1.1 Use
DiskFileItemFactory instead. |
getFileSizeMax, getHeaderEncoding, getItemIterator, getProgressListener, getSizeMax, isMultipartContent, isMultipartContent, parseParameterMap, parseRequest, parseRequest, setFileSizeMax, setHeaderEncoding, setProgressListener, setSizeMax
@Deprecated public DiskFileUpload()
FileUpload
instead.FileItem
instances.@Deprecated public DiskFileUpload(DefaultFileItemFactory fileItemFactory)
FileUpload
instead.FileItem
instances.fileItemFactory
- The file item factory to use.DiskFileUpload()
@Deprecated public FileItemFactory getFileItemFactory()
FileUpload
instead.getFileItemFactory
in class FileUploadBase
@Deprecated public void setFileItemFactory(FileItemFactory factory)
FileUpload
instead.DefaultFileItemFactory
or a subclass
thereof, or else a ClassCastException
will be thrown.setFileItemFactory
in class FileUploadBase
factory
- The factory class for new file items.@Deprecated public int getSizeThreshold()
DiskFileItemFactory
instead.setSizeThreshold(int)
@Deprecated public void setSizeThreshold(int sizeThreshold)
DiskFileItemFactory
instead.sizeThreshold
- The size threshold, in bytes.getSizeThreshold()
@Deprecated public java.lang.String getRepositoryPath()
DiskFileItemFactory
instead.setRepositoryPath(String)
@Deprecated public void setRepositoryPath(java.lang.String repositoryPath)
DiskFileItemFactory
instead.repositoryPath
- The path to the temporary file location.getRepositoryPath()
@Deprecated public java.util.List<FileItem> parseRequest(HttpServletRequest req, int sizeThreshold, long sizeMax, java.lang.String path) throws FileUploadException
ServletFileUpload
instead.multipart/form-data
stream. If files are stored
on disk, the path is given by getRepository()
.req
- The servlet request to be parsed. Must be non-null.sizeThreshold
- The max size in bytes to be stored in memory.sizeMax
- The maximum allowed upload size, in bytes.path
- The location where the files should be stored.FileItem
instances parsed from the
request, in the order that they were transmitted.FileUploadException
- if there are problems reading/parsing
the request or storing files.Copyright © 2010 - 2020 Adobe. All Rights Reserved