echopoint.tucana
Class AbstractFileUploadProvider
java.lang.Object
echopoint.tucana.AbstractFileUploadProvider
- All Implemented Interfaces:
- UploadSPI, WebContainerServlet.MultipartRequestWrapper
- Direct Known Subclasses:
- JakartaCommonsFileUploadProvider
public abstract class AbstractFileUploadProvider
- extends Object
- implements UploadSPI
Base UploadSPI implementation.
- Version:
- $Id: AbstractFileUploadProvider.java 106 2009-02-03 16:00:33Z sptrakesh $
- Author:
- Echo File Transfer Library
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractFileUploadProvider
public AbstractFileUploadProvider()
getDiskCacheLocation
public File getDiskCacheLocation()
throws IOException
- Description copied from interface:
UploadSPI
- Gets the directory to be used for storing file uploads that exceed the
memory cache threshold. Implementations should ensure that the returned
location exists. Implementations that do not support this should ignore
calls to this method.
- Specified by:
getDiskCacheLocation in interface UploadSPI
- Returns:
- location to store uploaded files.
- Throws:
IOException - if an I/O error occurs during this
operation- See Also:
UploadSPI.getDiskCacheLocation()
getFileUploadSizeLimit
public long getFileUploadSizeLimit()
- Description copied from interface:
UploadSPI
- Gets the maximum size, in bytes, of file uploads to be accepted.
Uploads that exceed the specified size are terminated or handled in a
manner that minimizes the risk of a Denial of Service attack against
the application. Implementations that do not impose a size limit should
return
UploadSPI.NO_SIZE_LIMIT.
- Specified by:
getFileUploadSizeLimit in interface UploadSPI
- Returns:
- the size threshold after which a file upload is rejected or
UploadSPI.NO_SIZE_LIMIT if there is no size limit. - See Also:
UploadSPI.getFileUploadSizeLimit()
getMemoryCacheThreshold
public int getMemoryCacheThreshold()
- Description copied from interface:
UploadSPI
- Gets the size, in bytes, that the file upload must exceed before being
cached to disk rather than in-memory. Implementations that do not
support this should ignore calls to this method.
- Specified by:
getMemoryCacheThreshold in interface UploadSPI
- Returns:
- the maximum size in bytes of the file upload before it will be
cached to disk.
- See Also:
UploadSPI.getMemoryCacheThreshold()
getWrappedRequest
public HttpServletRequest getWrappedRequest(HttpServletRequest request)
throws IOException,
ServletException
- Specified by:
getWrappedRequest in interface WebContainerServlet.MultipartRequestWrapper
- Throws:
IOException
ServletException- See Also:
WebContainerServlet.MultipartRequestWrapper.getWrappedRequest(javax.servlet.http.HttpServletRequest)