com.aliyun.downloader

## 类 AliMediaDownloader

- java.lang.Object
- - com.aliyun.downloader.AliMediaDownloader

-     public abstract class AliMediaDownloader
      extends java.lang.Object

- - ### 嵌套类概要

    嵌套类
    限定符和类型 | 类和说明
    --- | ---
    `static interface` | `AliMediaDownloader.ConvertURLCallback` Convert a specified URL before downloading the relevant media file.
    `static interface` | `AliMediaDownloader.OnCompletionListener` The download completion callback.
    `static interface` | `AliMediaDownloader.OnErrorListener` Error callback.
    `static interface` | `AliMediaDownloader.OnPreparedListener` The download preparation success callback.
    `static interface` | `AliMediaDownloader.OnProgressListener` The download progress callback.

  - ### 构造器概要

    构造器
    构造器和说明
    `AliMediaDownloader()`

  - ### 方法概要

    所有方法 静态方法 实例方法 抽象方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `abstract void` | `deleteFile()` Delete a specified file.
    `abstract java.lang.String` | `getFilePath()` Query the path of the downloaded file.
    `abstract void` | `prepare(VidAuth vidAuth)` Download resources through VidAuth.
    `abstract void` | `prepare(VidSts vidSts)` Download resources through VidSts
    `abstract void` | `release()` Release downloading.
    `abstract void` | `selectItem(int index)` Specify a track to download.
    `static void` | `setConvertURLCallback(AliMediaDownloader.ConvertURLCallback callback)` Set a URL conversion callback.
    `abstract void` | `setDownloaderConfig(DownloaderConfig config)`
    `abstract void` | `setOnCompletionListener(AliMediaDownloader.OnCompletionListener l)` Set a download success callback.
    `abstract void` | `setOnErrorListener(AliMediaDownloader.OnErrorListener l)` Set a download failure callback.
    `abstract void` | `setOnPreparedListener(AliMediaDownloader.OnPreparedListener l)` Set a download preparation completion callback.
    `abstract void` | `setOnProgressListener(AliMediaDownloader.OnProgressListener l)` Set a download progress callback.
    `abstract void` | `setSaveDir(java.lang.String absPath)` Specify the directory where the downloaded file is saved.
    `abstract void` | `start()` Start downloading.
    `abstract void` | `stop()` Stop downloading.
    `abstract void` | `updateSource(VidAuth vidAuth)` Update VidAuth information.
    `abstract void` | `updateSource(VidSts vidSts)` Update VidSts information.

    - ### 从类继承的方法 java.lang.Object

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

- - ### 构造器详细资料

    - #### AliMediaDownloader

          public AliMediaDownloader()

  - ### 方法详细资料

    - #### setSaveDir

          public abstract void setSaveDir(java.lang.String absPath)

      Specify the directory where the downloaded file is saved.
      参数:
        `absPath` - The absolute directory.

    - #### getFilePath

          public abstract java.lang.String getFilePath()

      Query the path of the downloaded file.
      返回:
        The path of the downloaded file.

    - #### selectItem

          public abstract void selectItem(int index)

      Specify a track to download.
      参数:
        `index` - The index of the track.

    - #### setOnCompletionListener

          public abstract void setOnCompletionListener(AliMediaDownloader.OnCompletionListener l)

      Set a download success callback.
      参数:
        `l` - The download success callback.

    - #### setOnErrorListener

          public abstract void setOnErrorListener(AliMediaDownloader.OnErrorListener l)

      Set a download failure callback.
      参数:
        `l` - The download failure callback.

    - #### setOnPreparedListener

          public abstract void setOnPreparedListener(AliMediaDownloader.OnPreparedListener l)

      Set a download preparation completion callback.
      参数:
        `l` - The download preparation completion callback.

    - #### setOnProgressListener

          public abstract void setOnProgressListener(AliMediaDownloader.OnProgressListener l)

      Set a download progress callback.
      参数:
        `l` - The download progress callback.

    - #### prepare

          public abstract void prepare(VidAuth vidAuth)

      Download resources through VidAuth.
      参数:
        `vidAuth` - See VidAuth.

    - #### prepare

          public abstract void prepare(VidSts vidSts)

      Download resources through VidSts
      参数:
        `vidSts` - See VidSts.

    - #### start

          public abstract void start()

      Start downloading.

    - #### stop

          public abstract void stop()

      Stop downloading.

    - #### release

          public abstract void release()

      Release downloading.

    - #### updateSource

          public abstract void updateSource(VidSts vidSts)

      Update VidSts information.
      参数:
        `vidSts` - See VidSts.

    - #### updateSource

          public abstract void updateSource(VidAuth vidAuth)

      Update VidAuth information.
      参数:
        `vidAuth` - See VidAuth.

    - #### deleteFile

          public abstract void deleteFile()

      Delete a specified file.

    - #### setDownloaderConfig

          public abstract void setDownloaderConfig(DownloaderConfig config)

    - #### setConvertURLCallback

          public static void setConvertURLCallback(AliMediaDownloader.ConvertURLCallback callback)

      Set a URL conversion callback.
      参数:
        `callback` - The URL conversion callback.