|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.fileupload.FileUploadBase org.apache.commons.fileupload.DiskFileUpload
ServletFileUpload
together with
DiskFileItemFactory
instead.
public class 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 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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.commons.fileupload.FileUploadBase |
---|
FileUploadBase.FileSizeLimitExceededException, FileUploadBase.FileUploadIOException, FileUploadBase.InvalidContentTypeException, FileUploadBase.IOFileUploadException, FileUploadBase.SizeException, FileUploadBase.SizeLimitExceededException, FileUploadBase.UnknownSizeException |
Field Summary |
---|
Fields inherited from class org.apache.commons.fileupload.FileUploadBase |
---|
ATTACHMENT, CONTENT_DISPOSITION, CONTENT_LENGTH, CONTENT_TYPE, FORM_DATA, MAX_HEADER_SIZE, MULTIPART, MULTIPART_FORM_DATA, MULTIPART_MIXED |
Constructor Summary | |
---|---|
DiskFileUpload()
Deprecated. Use FileUpload instead. |
|
DiskFileUpload(DefaultFileItemFactory fileItemFactory)
Deprecated. Use FileUpload instead. |
Method Summary | |
---|---|
FileItemFactory |
getFileItemFactory()
Deprecated. Use FileUpload instead. |
String |
getRepositoryPath()
Deprecated. Use DiskFileItemFactory instead. |
int |
getSizeThreshold()
Deprecated. Use DiskFileItemFactory instead. |
List |
parseRequest(javax.servlet.http.HttpServletRequest req,
int sizeThreshold,
long sizeMax,
String path)
Deprecated. Use ServletFileUpload instead. |
void |
setFileItemFactory(FileItemFactory factory)
Deprecated. Use FileUpload instead. |
void |
setRepositoryPath(String repositoryPath)
Deprecated. Use DiskFileItemFactory instead. |
void |
setSizeThreshold(int sizeThreshold)
Deprecated. Use DiskFileItemFactory instead. |
Methods inherited from class org.apache.commons.fileupload.FileUploadBase |
---|
createItem, getBoundary, getFieldName, getFieldName, getFileName, getFileName, getFileSizeMax, getHeader, getHeaderEncoding, getItemIterator, getParsedHeaders, getProgressListener, getSizeMax, isMultipartContent, isMultipartContent, newFileItemHeaders, parseHeaders, parseRequest, parseRequest, setFileSizeMax, setHeaderEncoding, setProgressListener, setSizeMax |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DiskFileUpload()
FileUpload
instead.
FileItem
instances.
DiskFileUpload(DefaultFileItemFactory fileItemFactory)
public DiskFileUpload(DefaultFileItemFactory fileItemFactory)
FileUpload
instead.
FileItem
instances.
fileItemFactory
- The file item factory to use.DiskFileUpload()
Method Detail |
---|
public FileItemFactory getFileItemFactory()
FileUpload
instead.
getFileItemFactory
in class FileUploadBase
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.public int getSizeThreshold()
DiskFileItemFactory
instead.
setSizeThreshold(int)
public void setSizeThreshold(int sizeThreshold)
DiskFileItemFactory
instead.
sizeThreshold
- The size threshold, in bytes.getSizeThreshold()
public String getRepositoryPath()
DiskFileItemFactory
instead.
setRepositoryPath(String)
public void setRepositoryPath(String repositoryPath)
DiskFileItemFactory
instead.
repositoryPath
- The path to the temporary file location.getRepositoryPath()
public List parseRequest(javax.servlet.http.HttpServletRequest req, int sizeThreshold, long sizeMax, 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |