com.bokecc.sdk.mobile.download

## 类 VodDownloadManager

- java.lang.Object
- - com.bokecc.sdk.mobile.download.VodDownloadManager

-     public class VodDownloadManager
      extends java.lang.Object

- - ### 嵌套类概要

    嵌套类
    限定符和类型 | 类和说明
    --- | ---
    `static interface` | `VodDownloadManager.OnDownloadFinishListener`
    `static interface` | `VodDownloadManager.OnUpdateDownload`

  - ### 构造器概要

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

  - ### 方法概要

    所有方法 静态方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `deleteDownloadInfo(DownloadOperator downloadOperator)`
    `java.lang.String` | `getApiKey()`
    `DownloadDataTool` | `getDownloadDataTool()`
    `int` | `getDownloadingCount()`
    `java.util.ArrayList<DownloadOperator>` | `getDownloadOperators()`
    `static VodDownloadManager` | `getInstance()`
    `int` | `getPauseAndWaitCount()`
    `java.lang.String` | `getUserId()`
    `void` | `init(android.content.Context context, java.lang.String userId, java.lang.String apiKey, java.lang.String downloadPath)`
    `void` | `insertBatchDownload(java.util.ArrayList<DownloadConfig> downloadConfigs)`
    `void` | `insertDownload(DownloadConfig downloadConfig)`
    `boolean` | `isExistDownloadInfo(java.lang.String fileName)`
    `void` | `pauseAllDownload()` 暂停全部下载
    `void` | `pauseDownload(DownloadOperator downloadOperator)`
    `void` | `resumeAllDownload()` 恢复全部下载
    `void` | `resumeDownload(DownloadOperator downloadOperator)`
    `void` | `resumeOrPauseDownload(DownloadOperator downloadOperator)`
    `void` | `setDownloadRetryPeriod(long downloadRetryPeriod)`
    `void` | `setDownloadSubtitle(boolean downloadSubtitle)`
    `void` | `setMaxDownloadingNum(int maxDownloadingNum)`
    `void` | `setOnDownloadFinishListener(VodDownloadManager.OnDownloadFinishListener onDownloadFinishListener)`
    `void` | `setOnUpdateDownload(VodDownloadManager.OnUpdateDownload onUpdateDownload)`
    `void` | `setReconnectLimit(int reconnectLimit)`
    `void` | `update()`

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

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

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

    - #### VodDownloadManager

          public VodDownloadManager()

  - ### 方法详细资料

    - #### getInstance

          public static VodDownloadManager getInstance()

    - #### init

          public void init(android.content.Context context,
                           java.lang.String userId,
                           java.lang.String apiKey,
                           java.lang.String downloadPath)

      参数:
        `context` - 上下文
        `userId` - userId
        `apiKey` - apiKey
        `downloadPath` - 存储路径

    - #### getDownloadDataTool

          public DownloadDataTool getDownloadDataTool()

    - #### setReconnectLimit

          public void setReconnectLimit(int reconnectLimit)

      参数:
        `reconnectLimit` - 下载重连次数，默认为10，可设置区间[0, 100]

    - #### setDownloadRetryPeriod

          public void setDownloadRetryPeriod(long downloadRetryPeriod)

      参数:
        `downloadRetryPeriod` - 下载重试间隔，单位ms

    - #### setDownloadSubtitle

          public void setDownloadSubtitle(boolean downloadSubtitle)

      参数:
        `downloadSubtitle` - 设置是否下载字幕，注：视频有字幕资源文件时才会下载

    - #### setMaxDownloadingNum

          public void setMaxDownloadingNum(int maxDownloadingNum)

      参数:
        `maxDownloadingNum` - 同时下载的个数

    - #### getUserId

          public java.lang.String getUserId()

    - #### getApiKey

          public java.lang.String getApiKey()

    - #### insertDownload

          public void insertDownload(DownloadConfig downloadConfig)

      参数:
        `downloadConfig` - 下载单个视频

    - #### insertBatchDownload

          public void insertBatchDownload(java.util.ArrayList<DownloadConfig> downloadConfigs)

      参数:
        `downloadConfigs` - 下载多个视频

    - #### deleteDownloadInfo

          public void deleteDownloadInfo(DownloadOperator downloadOperator)

      参数:
        `downloadOperator` - 删除下载

    - #### resumeAllDownload

          public void resumeAllDownload()

      恢复全部下载

    - #### pauseAllDownload

          public void pauseAllDownload()

      暂停全部下载

    - #### resumeDownload

          public void resumeDownload(DownloadOperator downloadOperator)

      参数:
        `downloadOperator` - 由暂停状态恢复下载

    - #### pauseDownload

          public void pauseDownload(DownloadOperator downloadOperator)

      参数:
        `downloadOperator` - 暂停下载

    - #### resumeOrPauseDownload

          public void resumeOrPauseDownload(DownloadOperator downloadOperator)

      参数:
        `downloadOperator` - 恢复或暂停下载

    - #### getDownloadingCount

          public int getDownloadingCount()

      返回:
        获取下载中的个数

    - #### getPauseAndWaitCount

          public int getPauseAndWaitCount()

      返回:
        获得暂停和等待中状态下的个数

    - #### update

          public void update()

    - #### getDownloadOperators

          public java.util.ArrayList<DownloadOperator> getDownloadOperators()

    - #### setOnUpdateDownload

          public void setOnUpdateDownload(VodDownloadManager.OnUpdateDownload onUpdateDownload)

    - #### setOnDownloadFinishListener

          public void setOnDownloadFinishListener(VodDownloadManager.OnDownloadFinishListener onDownloadFinishListener)

    - #### isExistDownloadInfo

          public boolean isExistDownloadInfo(java.lang.String fileName)