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
The AU processor to handle the resumable download.
Available in ZK EE
- Since:
- 3.5.0
- Author:
- tomyeh
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()static StringgetDownloadURI(File file, String contentType, String data) Returns the download URI of the specified file.static StringgetDownloadURI(String path, String contentType, String data) Returns the download URI of the specified file.static StringgetDownloadURI(URL url, String contentType, 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(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String pi) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.zkoss.zk.au.http.AuExtension
charsetSetup
-
Method Details
-
init
public static void init(org.zkoss.zk.ui.WebApp wapp) throws jakarta.servlet.ServletException Initializes the downloader.- Throws:
jakarta.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
Returns the download URI of the specified file. -
getDownloadURI
Returns the download URI of the specified file. -
getDownloadURI
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(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String pi) throws jakarta.servlet.ServletException, IOException - Specified by:
servicein interfaceorg.zkoss.zk.au.http.AuExtension- Throws:
jakarta.servlet.ServletExceptionIOException
-