Package com.google.android.exoplayer2.source

## Class LoadEventInfo

- java.lang.Object
- - com.google.android.exoplayer2.source.LoadEventInfo

-     public final class LoadEventInfo
      extends Object

  `MediaSource` load event information.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `long` | `bytesLoaded` | The number of bytes that were loaded up to the event time.
    `DataSpec` | `dataSpec` | Defines the requested data.
    `long` | `elapsedRealtimeMs` | The value of `SystemClock.elapsedRealtime()` at the time of the load event.
    `long` | `loadDurationMs` | The duration of the load up to the event time.
    `long` | `loadTaskId` | Identifies the load task to which this event corresponds.
    `Map<String,​List<String>>` | `responseHeaders` | The response headers associated with the load, or an empty map if unavailable.
    `Uri` | `uri` | The `Uri` from which data is being read.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `LoadEventInfo​(long loadTaskId, DataSpec dataSpec, long elapsedRealtimeMs)` | Equivalent to `LoadEventInfo(loadTaskId, dataSpec, dataSpec.uri, Collections.emptyMap(), elapsedRealtimeMs, 0, 0)`.
    `LoadEventInfo​(long loadTaskId, DataSpec dataSpec, Uri uri, Map<String,​List<String>> responseHeaders, long elapsedRealtimeMs, long loadDurationMs, long bytesLoaded)` | Creates load event info.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static long` | `getNewId()` | Returns an non-negative identifier which is unique to the JVM instance.

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

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

- - ### Field Detail

    - #### loadTaskId

          public final long loadTaskId

      Identifies the load task to which this event corresponds.

    - #### dataSpec

          public final DataSpec dataSpec

      Defines the requested data.

    - #### uri

          public final Uri uri

      The `Uri` from which data is being read. The uri will be identical to the one in `dataSpec`.uri unless redirection has occurred. If redirection has occurred, this is the uri after redirection.

    - #### responseHeaders

          public final Map<String,​List<String>> responseHeaders

      The response headers associated with the load, or an empty map if unavailable.

    - #### elapsedRealtimeMs

          public final long elapsedRealtimeMs

      The value of `SystemClock.elapsedRealtime()` at the time of the load event.

    - #### loadDurationMs

          public final long loadDurationMs

      The duration of the load up to the event time.

    - #### bytesLoaded

          public final long bytesLoaded

      The number of bytes that were loaded up to the event time.

  - ### Constructor Detail

    - #### LoadEventInfo

          public LoadEventInfo​(long loadTaskId,
                               DataSpec dataSpec,
                               long elapsedRealtimeMs)

      Equivalent to `LoadEventInfo(loadTaskId, dataSpec, dataSpec.uri, Collections.emptyMap(), elapsedRealtimeMs, 0, 0)`.

    - #### LoadEventInfo

          public LoadEventInfo​(long loadTaskId,
                               DataSpec dataSpec,
                               Uri uri,
                               Map<String,​List<String>> responseHeaders,
                               long elapsedRealtimeMs,
                               long loadDurationMs,
                               long bytesLoaded)

      Creates load event info.
      Parameters:
        `loadTaskId` - See `loadTaskId`.
        `dataSpec` - See `dataSpec`.
        `uri` - See `uri`.
        `responseHeaders` - See `responseHeaders`.
        `elapsedRealtimeMs` - See `elapsedRealtimeMs`.
        `loadDurationMs` - See `loadDurationMs`.
        `bytesLoaded` - See `bytesLoaded`.

  - ### Method Detail

    - #### getNewId

          public static long getNewId()

      Returns an non-negative identifier which is unique to the JVM instance.