Package com.castlabs.android.downloader

# Class DownloadInfo

java.lang.Object
com.castlabs.android.downloader.DownloadInfo

public class DownloadInfo extends Object
Utility class that can be used to read download.info files to limit the availability of tracks.

Since:
  3.2.0

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final int[]`
  `videoTracks`
  The original indices of the selected video tracks

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<TrackIndexOverride>`
  `getAudioTracks()`
  `List<Track>`
  `getSideloadedTracks()`
  `List<TrackIndexOverride>`
  `getSubtitleTracks()`
  `static DownloadInfo`
  `load(String pathToManifest)`
  Takes a path to a Manifest and checks if next to the manifest file, a download info file exists.
  `static void`
  `write(String manifestPath, int[] videoTracks, Track[] audioTracks, Track[] subtitleTracks, Track[] sideloadedTracks)`

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

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

- ## Field Details

  - ### videoTracks

    @Nullable public final int[] videoTracks
    The original indices of the selected video tracks

- ## Method Details

  - ### getAudioTracks

    @Nullable public List<TrackIndexOverride> getAudioTracks()

  - ### getSubtitleTracks

    @Nullable public List<TrackIndexOverride> getSubtitleTracks()

  - ### getSideloadedTracks

    @Nullable public List<Track> getSideloadedTracks()

  - ### load

    @NonNull public static DownloadInfo load(String pathToManifest)
    Takes a path to a Manifest and checks if next to the manifest file, a download info file exists. If so, a the info file is loaded and returned. Otherwise, an empty download info instance is returned.
    Parameters:
      `pathToManifest` - The path to the manifest file
    Returns:
      The new info instance

  - ### write

    public static void write(String manifestPath, @Nullable int[] videoTracks, @Nullable Track[] audioTracks, @Nullable Track[] subtitleTracks, @Nullable Track[] sideloadedTracks) throws IOException
    Throws:
      `IOException`