|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnextapp.echo2.webcontainer.filetransfer.AbstractFileUploadProvider
public abstract class AbstractFileUploadProvider
Base abstract class containing common implementations
| Field Summary | |
|---|---|
protected static java.io.File |
TEMPDIR_FILE
|
protected static java.lang.String |
TEMPDIR_PATH
|
| Fields inherited from interface nextapp.echo2.webcontainer.filetransfer.MultipartUploadSPI |
|---|
SYSTEM_PROPERTY_NAME |
| Constructor Summary | |
|---|---|
AbstractFileUploadProvider()
|
|
| Method Summary | |
|---|---|
java.io.File |
getDiskCacheLocation()
Gets the directory to be used for storing file uploads that exceed the memory cache threshold. |
int |
getFileUploadSizeLimit()
Gets the maximum size, in bytes, of file uploads to be accepted. |
int |
getMemoryCacheThreshold()
Gets the size, in bytes, that the file upload must exceed before being cached to disk. |
HttpServletRequest |
getWrappedRequest(HttpServletRequest request)
Returns a replacement HttpServletRequest object that
may be used to handle a multipart/form-data encoded HTTP request. |
boolean |
supportsDiskCaching()
Implementations return true if they support caching the
uploaded file to disk. |
boolean |
supportsFileUploadSizeLimit()
Implementations return true if they support limiting the
size of the upload. |
protected java.io.File |
writeTempFile(java.io.InputStream in,
UploadSelect uploadSelect)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface nextapp.echo2.webcontainer.filetransfer.MultipartUploadSPI |
|---|
updateComponent |
| Field Detail |
|---|
protected static final java.lang.String TEMPDIR_PATH
protected static final java.io.File TEMPDIR_FILE
| Constructor Detail |
|---|
public AbstractFileUploadProvider()
| Method Detail |
|---|
public boolean supportsDiskCaching()
MultipartUploadSPItrue if they support caching the
uploaded file to disk. Implementations that return true
must not throw UnsupportedOperationExceptions for the
methods setMemoryCacheThreshold() and
setDiskCacheLocation().
supportsDiskCaching in interface MultipartUploadSPIMultipartUploadSPI.supportsDiskCaching()public boolean supportsFileUploadSizeLimit()
MultipartUploadSPItrue if they support limiting the
size of the upload. Implementations that return true must
not throw an UnsupportedOperationException for the method
setFileUploadSizeLimit().
supportsFileUploadSizeLimit in interface MultipartUploadSPIMultipartUploadSPI.supportsFileUploadSizeLimit()
public java.io.File getDiskCacheLocation()
throws java.io.IOException,
java.lang.UnsupportedOperationException
MultipartUploadSPI
getDiskCacheLocation in interface MultipartUploadSPIjava.io.IOException - if the directory does not exist or the File throws
an IOException during this operation
java.lang.UnsupportedOperationException - if this implementation does not
support disk cachingMultipartUploadSPI.getDiskCacheLocation()
public int getFileUploadSizeLimit()
throws java.lang.UnsupportedOperationException
MultipartUploadSPI
getFileUploadSizeLimit in interface MultipartUploadSPIjava.lang.UnsupportedOperationException - if this implementation does not
support limiting file upload sizesMultipartUploadSPI.getFileUploadSizeLimit()
public int getMemoryCacheThreshold()
throws java.lang.UnsupportedOperationException
MultipartUploadSPIUnsupportedOperationException.
getMemoryCacheThreshold in interface MultipartUploadSPIjava.lang.UnsupportedOperationException - if this implementation does not
support disk cachingMultipartUploadSPI.getMemoryCacheThreshold()
public HttpServletRequest getWrappedRequest(HttpServletRequest request)
throws java.io.IOException,
ServletException
WebRenderAction.MultipartRequestWrapperHttpServletRequest object that
may be used to handle a multipart/form-data encoded HTTP request.
getWrappedRequest in interface WebRenderAction.MultipartRequestWrapperrequest - The HTTP request provided from the servlet container
that has multipart/form-data encoding.
java.io.IOException
ServletException
protected java.io.File writeTempFile(java.io.InputStream in,
UploadSelect uploadSelect)
throws java.io.IOException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||