com.aliyun.downloader

## Class AliDownloaderFactory

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

-     public class AliDownloaderFactory
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AliDownloaderFactory()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static AliMediaDownloader` | `create(android.content.Context context)` Create a download task.
    `static int` | `deleteFile(java.lang.String saveDir, java.lang.String vid, java.lang.String format, int index)` Delete a specified video file.

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

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

- - ### Constructor Detail

    - #### AliDownloaderFactory

          public AliDownloaderFactory()

  - ### Method Detail

    - #### create

          public static AliMediaDownloader create(android.content.Context context)

      Create a download task.
      Parameters:
        `context` - Context.
      Returns:
        The object that you want to download. See AliMediaDownloader.

    - #### deleteFile

          public static int deleteFile(java.lang.String saveDir,
                                       java.lang.String vid,
                                       java.lang.String format,
                                       int index)

      Delete a specified video file. Note: Make sure that the video file is not used by other download tasks.
      Parameters:
        `saveDir` - The directory where the video file is saved.
        `vid` - The ID of the video.
        `format` - The format of the video.
        `index` - The index of the video.
      Returns:
        If the video file is deleted, value 0 is returned.