Class BaseDataSource

    • Constructor Detail

      • BaseDataSource

        protected BaseDataSource​(boolean isNetwork)
        Creates base data source.
        Parameters:
        isNetwork - Whether the data source loads data through a network.
    • Method Detail

      • transferInitializing

        protected final void transferInitializing​(DataSpec dataSpec)
        Notifies listeners that data transfer for the specified DataSpec is being initialized.
        Parameters:
        dataSpec - DataSpec describing the data for initializing transfer.
      • transferStarted

        protected final void transferStarted​(DataSpec dataSpec)
        Notifies listeners that data transfer for the specified DataSpec started.
        Parameters:
        dataSpec - DataSpec describing the data being transferred.
      • bytesTransferred

        protected final void bytesTransferred​(int bytesTransferred)
        Notifies listeners that bytes were transferred.
        Parameters:
        bytesTransferred - The number of bytes transferred since the previous call to this method (or if the first call, since the transfer was started).
      • transferEnded

        protected final void transferEnded()
        Notifies listeners that a transfer ended.