Package com.google.android.exoplayer2.upstream

## Interface TimeToFirstByteEstimator

-     public interface TimeToFirstByteEstimator

  Provides an estimate of the time to first byte of a transfer.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `long` | `getTimeToFirstByteEstimateUs()` | Returns the estimated time to first byte of the response body, in microseconds, or `C.TIME_UNSET` if no estimate is available.
    `void` | `onTransferInitializing​(DataSpec dataSpec)` | Called when a transfer is being initialized.
    `void` | `onTransferStart​(DataSpec dataSpec)` | Called when a transfer starts.
    `void` | `reset()` | Resets the estimator.

- - ### Method Detail

    - #### getTimeToFirstByteEstimateUs

          long getTimeToFirstByteEstimateUs()

      Returns the estimated time to first byte of the response body, in microseconds, or `C.TIME_UNSET` if no estimate is available.

    - #### reset

          void reset()

      Resets the estimator.

    - #### onTransferInitializing

          void onTransferInitializing​(DataSpec dataSpec)

      Called when a transfer is being initialized.
      Parameters:
        `dataSpec` - Describes the data for which the transfer is initialized.

    - #### onTransferStart

          void onTransferStart​(DataSpec dataSpec)

      Called when a transfer starts.
      Parameters:
        `dataSpec` - Describes the data being transferred.