Class AuDownloader

java.lang.Object
org.zkoss.zkmax.au.http.AuDownloader
All Implemented Interfaces:
org.zkoss.zk.au.http.AuExtension

public class AuDownloader extends Object implements 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 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:
      init in interface org.zkoss.zk.au.http.AuExtension
    • destroy

      public void destroy()
      Specified by:
      destroy in interface org.zkoss.zk.au.http.AuExtension
    • getDownloadURI

      public static String getDownloadURI(File file, String contentType, String data)
      Returns the download URI of the specified file.
    • getDownloadURI

      public static String getDownloadURI(URL url, String contentType, String data)
      Returns the download URI of the specified file.
    • getDownloadURI

      public static String getDownloadURI(String path, String contentType, 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(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String pi) throws jakarta.servlet.ServletException, IOException
      Specified by:
      service in interface org.zkoss.zk.au.http.AuExtension
      Throws:
      jakarta.servlet.ServletException
      IOException