|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjodd.servlet.upload.impl.AdaptiveFileUploadFactory
public class AdaptiveFileUploadFactory
Factory for AdaptiveFileUpload.
| Field Summary | |
|---|---|
protected boolean |
allowFileExtensions
|
protected boolean |
breakOnError
|
protected java.lang.String[] |
fileExtensions
|
protected int |
maxFileSize
|
protected int |
memoryThreshold
|
protected java.io.File |
uploadPath
|
| Constructor Summary | |
|---|---|
AdaptiveFileUploadFactory()
|
|
| Method Summary | |
|---|---|
AdaptiveFileUploadFactory |
breakOnError(boolean breakOnError)
Specifies if upload should break on error. |
FileUpload |
create(MultipartRequestInputStream input)
Creates new instance of uploaded file. |
int |
getMaxFileSize()
|
int |
getMemoryThreshold()
|
java.io.File |
getUploadPath()
|
boolean |
isBreakOnError()
|
AdaptiveFileUploadFactory |
setBreakOnError(boolean breakOnError)
|
AdaptiveFileUploadFactory |
setFileExtensions(java.lang.String[] fileExtensions,
boolean allow)
Allow or disallow set of file extensions. |
AdaptiveFileUploadFactory |
setMaxFileSize(int maxFileSize)
Sets maximum file upload size. |
AdaptiveFileUploadFactory |
setMemoryThreshold(int memoryThreshold)
Specifies per file memory limit for keeping uploaded files in the memory. |
AdaptiveFileUploadFactory |
setUploadPath(java.io.File uploadPath)
Specifies the upload path. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int memoryThreshold
protected java.io.File uploadPath
protected int maxFileSize
protected boolean breakOnError
protected java.lang.String[] fileExtensions
protected boolean allowFileExtensions
| Constructor Detail |
|---|
public AdaptiveFileUploadFactory()
| Method Detail |
|---|
public FileUpload create(MultipartRequestInputStream input)
uploaded file.
create in interface FileUploadFactorypublic int getMemoryThreshold()
public AdaptiveFileUploadFactory setMemoryThreshold(int memoryThreshold)
public java.io.File getUploadPath()
public AdaptiveFileUploadFactory setUploadPath(java.io.File uploadPath)
null default
system TEMP path will be used.
public int getMaxFileSize()
public AdaptiveFileUploadFactory setMaxFileSize(int maxFileSize)
-1
disables this constraint.
public boolean isBreakOnError()
public AdaptiveFileUploadFactory setBreakOnError(boolean breakOnError)
public AdaptiveFileUploadFactory breakOnError(boolean breakOnError)
public AdaptiveFileUploadFactory setFileExtensions(java.lang.String[] fileExtensions,
boolean allow)
null will turn this feature off.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||