Package org.zkoss.zkmax.au.http
Class AuDownloader
- java.lang.Object
-
- org.zkoss.zkmax.au.http.AuDownloader
-
- All Implemented Interfaces:
org.zkoss.zk.au.http.AuExtension
public class AuDownloader extends java.lang.Object implements org.zkoss.zk.au.http.AuExtensionThe AU processor to handle the resumable download.Available in ZK EE
- Since:
- 3.5.0
- Author:
- tomyeh
- See Also:
Filedownload
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()static java.lang.StringgetDownloadURI(java.io.File file, java.lang.String contentType, java.lang.String data)Returns the download URI of the specified file.static java.lang.StringgetDownloadURI(java.lang.String path, java.lang.String contentType, java.lang.String data)Returns the download URI of the specified file.static java.lang.StringgetDownloadURI(java.net.URL url, java.lang.String contentType, java.lang.String data)Returns the download URI of the specified file.voidinit(org.zkoss.zk.au.http.DHtmlUpdateServlet servlet)static voidinit(org.zkoss.zk.ui.WebApp wapp)Initializes the downloader.voidservice(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String pi)
-
-
-
Method Detail
-
init
public static void init(org.zkoss.zk.ui.WebApp wapp) throws javax.servlet.ServletExceptionInitializes the downloader.- Throws:
javax.servlet.ServletException
-
init
public void init(org.zkoss.zk.au.http.DHtmlUpdateServlet servlet)
- Specified by:
initin interfaceorg.zkoss.zk.au.http.AuExtension
-
destroy
public void destroy()
- Specified by:
destroyin interfaceorg.zkoss.zk.au.http.AuExtension
-
getDownloadURI
public static java.lang.String getDownloadURI(java.io.File file, java.lang.String contentType, java.lang.String data)Returns the download URI of the specified file.
-
getDownloadURI
public static java.lang.String getDownloadURI(java.net.URL url, java.lang.String contentType, java.lang.String data)Returns the download URI of the specified file.
-
getDownloadURI
public static java.lang.String getDownloadURI(java.lang.String path, java.lang.String contentType, java.lang.String data)Returns the download URI of the specified file.- Parameters:
path- the path to access the resource of the Web application. In other words, it is URI of ServletContext. Since 3.6.1: if the path is relative,Desktop.getCurrentDirectory()is assumed.
-
service
public void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String pi) throws javax.servlet.ServletException, java.io.IOException- Specified by:
servicein interfaceorg.zkoss.zk.au.http.AuExtension- Throws:
javax.servlet.ServletExceptionjava.io.IOException
-
-