Package org.zkoss.zul

## Class Filedownload.DownloadItem

- java.lang.Object
- - org.zkoss.zul.Filedownload.DownloadItem

- Enclosing class:
    Filedownload

      public static class Filedownload.DownloadItem
      extends java.lang.Object

  Helper class for specifying media and optional custom filename for multiple file downloads.
  Since:
    10.3.0

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DownloadItem​(Media media)` | Creates a download item using the media's original filename.
    `DownloadItem​(Media media, java.lang.String filename)` | Creates a download item with custom filename.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.String` | `getFilename()` |
    `Media` | `getMedia()` |
    `static Filedownload.DownloadItem` | `of​(Media media)` | Static factory method to create a download item using media's original filename.
    `static Filedownload.DownloadItem` | `of​(Media media, java.lang.String filename)` | Static factory method to create a download item with custom filename.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DownloadItem

          public DownloadItem​(Media media,
                              java.lang.String filename)

      Creates a download item with custom filename.
      Parameters:
        `media` - the media to download
        `filename` - the custom filename (can be null to use media's original name)

    - #### DownloadItem

          public DownloadItem​(Media media)

      Creates a download item using the media's original filename.
      Parameters:
        `media` - the media to download

  - ### Method Detail

    - #### of

          public static Filedownload.DownloadItem of​(Media media,
                                                     java.lang.String filename)

      Static factory method to create a download item with custom filename.
      Parameters:
        `media` - the media to download
        `filename` - the custom filename
      Returns:
        a new DownloadItem instance

    - #### of

          public static Filedownload.DownloadItem of​(Media media)

      Static factory method to create a download item using media's original filename.
      Parameters:
        `media` - the media to download
      Returns:
        a new DownloadItem instance

    - #### getMedia

          public Media getMedia()

    - #### getFilename

          public java.lang.String getFilename()