public class DiskFileUpload extends FileUpload
FileUpload that saves uploaded files directly to destination folder.| Modifier and Type | Field and Description |
|---|---|
protected java.io.File |
destFolder |
protected java.io.File |
file |
fileTooBig, header, input, maxFileSize, size, valid| Modifier and Type | Method and Description |
|---|---|
java.io.File |
getDestinationFolder()
Returns destination folder.
|
java.io.File |
getFile()
Returns uploaded and saved file.
|
byte[] |
getFileContent()
Returns files content from disk file.
|
java.io.InputStream |
getFileInputStream()
Returns new buffered file input stream.
|
boolean |
isInMemory()
Returns
false as uploaded file is stored on disk. |
protected void |
processStream()
Process request input stream.
|
getHeader, getMaxFileSize, getSize, isFileTooBig, isUploaded, isValid, toStringpublic boolean isInMemory()
false as uploaded file is stored on disk.isInMemory in class FileUploadpublic java.io.File getDestinationFolder()
public java.io.File getFile()
public byte[] getFileContent()
throws java.io.IOException
nullgetFileContent in class FileUploadjava.io.IOExceptionpublic java.io.InputStream getFileInputStream()
throws java.io.IOException
getFileInputStream in class FileUploadjava.io.IOExceptionprotected void processStream()
throws java.io.IOException
FileUploadsize
attribute after successful processing. This method also must set the
valid attribute.processStream in class FileUploadjava.io.IOExceptionMultipartRequestInputStreamCopyright © 2003-present Jodd Team