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, toString
public boolean isInMemory()
false
as uploaded file is stored on disk.isInMemory
in class FileUpload
public java.io.File getDestinationFolder()
public java.io.File getFile()
public byte[] getFileContent() throws java.io.IOException
null
getFileContent
in class FileUpload
java.io.IOException
public java.io.InputStream getFileInputStream() throws java.io.IOException
getFileInputStream
in class FileUpload
java.io.IOException
protected void processStream() throws java.io.IOException
FileUpload
size
attribute after successful processing. This method also must set the
valid
attribute.processStream
in class FileUpload
java.io.IOException
MultipartRequestInputStream
Copyright © 2003-present Jodd Team